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/5e4b63b8-2a75-422c-af39-5bff72a1ed99

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQxNjYyNTk0fQ.kyttv0_KPQN3fVUxTrQBqD9b-0z3bpRhEK7jBwUD9iQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-40/spaces/5e4b63b8-2a75-422c-af39-5bff72a1ed99" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQxNjYyNTk0fQ.kyttv0_KPQN3fVUxTrQBqD9b-0z3bpRhEK7jBwUD9iQ" \
	-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-08-31T21:49:54Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7e9ebf01-dd1a-43ec-966f-929bc066cc23",
    "default_space_url": "/v2/spaces/7e9ebf01-dd1a-43ec-966f-929bc066cc23",
    "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: dbc7e9ee-d899-4c4e-b82a-acceecd2b730
Content-Length: 836
X-Content-Type-Options: nosniff