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-57/spaces/c38c7ca8-5109-413c-b3df-de51d6dcc072

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU4IiwiZW1haWwiOiJlbWFpbC00OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2MTg3NzM5fQ.GswrLJIaXEb3G6HHX9uvGeRkusRuYOUOPKvf5E2WalY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-57/spaces/c38c7ca8-5109-413c-b3df-de51d6dcc072" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU4IiwiZW1haWwiOiJlbWFpbC00OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2MTg3NzM5fQ.GswrLJIaXEb3G6HHX9uvGeRkusRuYOUOPKvf5E2WalY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-57",
    "url": "/v2/users/uaa-id-57",
    "created_at": "2015-03-05T19:15:39Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "d7511f6e-b11a-4f3f-8482-ed6a7a93a3e0",
    "default_space_url": "/v2/spaces/d7511f6e-b11a-4f3f-8482-ed6a7a93a3e0",
    "spaces_url": "/v2/users/uaa-id-57/spaces",
    "organizations_url": "/v2/users/uaa-id-57/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-57/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-57/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-57/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-57/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-57/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 985e8250-4124-4fca-9efd-f840f81f4530
Content-Length: 836
X-Content-Type-Options: nosniff