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-340/spaces/8624e6d5-1073-4f82-beea-b4faa1732c85

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0MSIsImVtYWlsIjoiZW1haWwtMjE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTJ9.PmiJ_rVMEupU6-sC8AcFMDGTUFWSsacWrA-LPISNTq4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-340/spaces/8624e6d5-1073-4f82-beea-b4faa1732c85" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0MSIsImVtYWlsIjoiZW1haWwtMjE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTJ9.PmiJ_rVMEupU6-sC8AcFMDGTUFWSsacWrA-LPISNTq4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-340",
    "url": "/v2/users/uaa-id-340",
    "created_at": "2015-09-30T23:30:52Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7b3512ee-7afb-4fbf-bc8f-e62fbc051e9b",
    "default_space_url": "/v2/spaces/7b3512ee-7afb-4fbf-bc8f-e62fbc051e9b",
    "spaces_url": "/v2/users/uaa-id-340/spaces",
    "organizations_url": "/v2/users/uaa-id-340/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-340/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-340/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-340/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-340/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-340/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 80876a4a-5cc9-4fc1-8ac5-2fe5784f19e8
Content-Length: 845
X-Content-Type-Options: nosniff