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.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MyIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5Nzd9.gf_XkpM8IGYPfnxn0otGWPhaoLIl_ezRTMWJ2q0kkVM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

DELETE /v2/users/uaa-id-292/spaces/73357dba-a896-4e1f-8cba-73536e04aa25

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-292/spaces/73357dba-a896-4e1f-8cba-73536e04aa25" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MyIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5Nzd9.gf_XkpM8IGYPfnxn0otGWPhaoLIl_ezRTMWJ2q0kkVM" \
	-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: b2d1a151-5270-4472-b3bb-e51e03ba0ec4
Content-Length: 850
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-292",
    "url": "/v2/users/uaa-id-292",
    "created_at": "2014-12-24T01:39:37+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "dde0b109-0876-4f52-9cf7-fb8665f463eb",
    "default_space_url": "/v2/spaces/dde0b109-0876-4f52-9cf7-fb8665f463eb",
    "spaces_url": "/v2/users/uaa-id-292/spaces",
    "organizations_url": "/v2/users/uaa-id-292/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-292/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-292/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-292/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-292/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-292/audited_spaces"
  }
}