Home
Version 3
Users API

Users API

Remove Space from the User

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

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyIiwiZW1haWwiOiJlbWFpbC0zNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMxfQ.hEdW8VVoCA1ayiyHACOE9qxQiV46MPJZC5m9ki-yFZY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

DELETE /v2/users/uaa-id-41/spaces/b3fbec18-72c8-4a74-bee1-72e22ecead48

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-41/spaces/b3fbec18-72c8-4a74-bee1-72e22ecead48" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyIiwiZW1haWwiOiJlbWFpbC0zNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMxfQ.hEdW8VVoCA1ayiyHACOE9qxQiV46MPJZC5m9ki-yFZY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 247f7d4b-5920-4ca2-b998-6a6de9a55c7f
Content-Length: 841
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-41",
    "url": "/v2/users/uaa-id-41",
    "created_at": "2014-11-05T01:02:11+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7d8cc7fd-61c6-4d99-acb7-12190100dbdc",
    "default_space_url": "/v2/spaces/7d8cc7fd-61c6-4d99-acb7-12190100dbdc",
    "spaces_url": "/v2/users/uaa-id-41/spaces",
    "organizations_url": "/v2/users/uaa-id-41/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-41/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-41/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-41/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-41/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-41/audited_spaces"
  }
}