Home
Version 3
Users API

Users API

Remove Space from the User

DELETE /v2/users/:guid/spaces/:space_guid

Request

Route

DELETE /v2/users/uaa-id-40/spaces/e5b8d4d0-867c-4f75-ba1c-3f5884038d3b

Parameters

Name Description Valid Values Example Values
guid The guid of the User
space_guid The guid of the space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI5fQ.7LtkD4HVqZ7R7KwveUEK9HfQ9IQ68qZoZNitQ8znpow
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-40/spaces/e5b8d4d0-867c-4f75-ba1c-3f5884038d3b" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI5fQ.7LtkD4HVqZ7R7KwveUEK9HfQ9IQ68qZoZNitQ8znpow" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-40",
    "url": "/v2/users/uaa-id-40",
    "created_at": "2015-10-15T23:52:08Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "072aa9e8-3bba-4dd5-adcb-1c6fd5892083",
    "default_space_url": "/v2/spaces/072aa9e8-3bba-4dd5-adcb-1c6fd5892083",
    "spaces_url": "/v2/users/uaa-id-40/spaces",
    "organizations_url": "/v2/users/uaa-id-40/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-40/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-40/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-40/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-40/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-40/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d5a5da13-f41d-41ca-9ff5-57cfc5ed45a0
Content-Length: 836
X-Content-Type-Options: nosniff