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-329/spaces/3e37b37c-6a33-447e-b828-d5124a671dd2

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMCIsImVtYWlsIjoiZW1haWwtMjQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTV9.lg5Z7PM7F91OI_yRNiC9ORRNpJDzVfNyJz6Z-TkVXzA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-329/spaces/3e37b37c-6a33-447e-b828-d5124a671dd2" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMCIsImVtYWlsIjoiZW1haWwtMjQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTV9.lg5Z7PM7F91OI_yRNiC9ORRNpJDzVfNyJz6Z-TkVXzA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-329",
    "url": "/v2/users/uaa-id-329",
    "created_at": "2015-10-13T17:31:55Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "9448a0b2-6478-4066-9b13-299aa372f40f",
    "default_space_url": "/v2/spaces/9448a0b2-6478-4066-9b13-299aa372f40f",
    "spaces_url": "/v2/users/uaa-id-329/spaces",
    "organizations_url": "/v2/users/uaa-id-329/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-329/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-329/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-329/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-329/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-329/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f776a0d5-855d-4866-8065-8064146dcbbe
Content-Length: 845
X-Content-Type-Options: nosniff