Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid

Request

Route

DELETE /v2/spaces/f67e6716-ddce-4c48-a9ea-e2c85f4bedce

Parameters

Name Description Valid Values Example Values
guid The guid of the Space
recursive Will delete all apps, services, and routes associated with the space
  • true
  • false
async Will run the delete request in a background job. Recommended: 'true'.
  • true
  • false

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/f67e6716-ddce-4c48-a9ea-e2c85f4bedce" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDZ9.Dc7DmxDMOGMdlGpKj3KOZUyc6A7KzPJ9zAWFoo1COAQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: a2223c3c-a8d2-404a-bd68-9b5654a6c163
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 43
guid 8546b4b9-b393-44d7-bb42-79e875c42c4b
created_at 2015-08-31 21:50:06 UTC
updated_at
timestamp 2015-08-31 21:50:06 UTC
type audit.space.delete-request
actor uaa-id-243
actor_type user
actee f67e6716-ddce-4c48-a9ea-e2c85f4bedce
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 3798ed7e-e848-4cd9-8a04-b0094b9e2fa5
space_guid f67e6716-ddce-4c48-a9ea-e2c85f4bedce
actor_name email-169@somedomain.com
actee_name name-869