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-185/spaces/7a452fcb-ee11-4c79-a8e7-8df0a43785b5

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NiIsImVtYWlsIjoiZW1haWwtMTM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTd9.Be4MQETegJGoUYeN-tai1Fy9sxCXbZSt4KGV-9s3i7o
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-185/spaces/7a452fcb-ee11-4c79-a8e7-8df0a43785b5" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NiIsImVtYWlsIjoiZW1haWwtMTM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTd9.Be4MQETegJGoUYeN-tai1Fy9sxCXbZSt4KGV-9s3i7o" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-185",
    "url": "/v2/users/uaa-id-185",
    "created_at": "2015-07-27T22:43:17Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "37e3be2d-d730-4adf-9fe5-d5f7efc15cba",
    "default_space_url": "/v2/spaces/37e3be2d-d730-4adf-9fe5-d5f7efc15cba",
    "spaces_url": "/v2/users/uaa-id-185/spaces",
    "organizations_url": "/v2/users/uaa-id-185/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-185/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-185/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-185/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-185/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-185/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 24ed675b-8ebd-44a7-b9b5-5a217527f3d1
Content-Length: 845
X-Content-Type-Options: nosniff