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-195/spaces/a36eb007-95a0-43e4-a012-89ee2aa0f738

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-195/spaces/a36eb007-95a0-43e4-a012-89ee2aa0f738" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NiIsImVtYWlsIjoiZW1haWwtMTM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDR9.GeaCrzxaJYXR0aIFUCTY8rJqcCfxNHf5t2UaIB92VNM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-195",
    "url": "/v2/users/uaa-id-195",
    "created_at": "2015-03-10T23:11:44Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "bba4f026-b9a6-4be8-8324-2999e729f897",
    "default_space_url": "/v2/spaces/bba4f026-b9a6-4be8-8324-2999e729f897",
    "spaces_url": "/v2/users/uaa-id-195/spaces",
    "organizations_url": "/v2/users/uaa-id-195/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-195/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-195/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-195/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-195/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-195/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 552dadc8-e1b9-400d-bf95-767adf1a722e
Content-Length: 845
X-Content-Type-Options: nosniff