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-267/spaces/84443966-86d2-4484-8d07-08c847e6999e

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OCIsImVtYWlsIjoiZW1haWwtMTc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzd9.We6nqFZ8N_Y3P-V54FY4XzRhCDDXYXfYzLNbmWhNE4Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-267/spaces/84443966-86d2-4484-8d07-08c847e6999e" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OCIsImVtYWlsIjoiZW1haWwtMTc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzd9.We6nqFZ8N_Y3P-V54FY4XzRhCDDXYXfYzLNbmWhNE4Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-267",
    "url": "/v2/users/uaa-id-267",
    "created_at": "2015-10-07T00:35:37Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "a15463f8-a2e1-42e9-a6ce-c3fc7f0fd4b4",
    "default_space_url": "/v2/spaces/a15463f8-a2e1-42e9-a6ce-c3fc7f0fd4b4",
    "spaces_url": "/v2/users/uaa-id-267/spaces",
    "organizations_url": "/v2/users/uaa-id-267/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-267/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-267/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-267/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-267/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-267/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3f51251e-a338-4ad5-8736-407a981f14b6
Content-Length: 845
X-Content-Type-Options: nosniff