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-410/spaces/5fa7133d-2243-4404-b706-ccbdc784dd3e

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-410/spaces/5fa7133d-2243-4404-b706-ccbdc784dd3e" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMSIsImVtYWlsIjoiZW1haWwtMjg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTB9.Tt0OMB5Ds6t3H93LapdyQ4Lg07wJNCZX94GCbcD0qVg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-410",
    "url": "/v2/users/uaa-id-410",
    "created_at": "2015-09-11T18:39:10Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "eb3a9180-a10e-4ace-9c17-83171eae2514",
    "default_space_url": "/v2/spaces/eb3a9180-a10e-4ace-9c17-83171eae2514",
    "spaces_url": "/v2/users/uaa-id-410/spaces",
    "organizations_url": "/v2/users/uaa-id-410/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-410/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-410/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-410/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-410/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-410/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d00dd17b-1ac1-47d3-aeda-d6f0938c5b7b
Content-Length: 845
X-Content-Type-Options: nosniff