Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/ca66d564-3641-4aac-b5c4-a0a36489309e?

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/ca66d564-3641-4aac-b5c4-a0a36489309e?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMTc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MTh9.dtyJixk9pCO79_OtxPbnpoA78F6DqZhoSQywUsiIJ_8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: e539bd38-0fcd-4bd2-a749-4fe19e0f13f7
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 186
guid 5e834b4e-6205-427c-99d4-af790acfd4a8
created_at 2016-05-12 00:45:18 UTC
updated_at
timestamp 2016-05-12 00:45:18 UTC
type audit.space.delete-request
actor uaa-id-281
actor_type user
actee ca66d564-3641-4aac-b5c4-a0a36489309e
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid da1d5218-8386-4be9-b651-f4038f362dec
space_guid ca66d564-3641-4aac-b5c4-a0a36489309e
actor_name email-177@somedomain.com
actee_name name-1648