Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/2e3c24e3-f576-4782-bcb1-6862d0f7a7ff?

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzV9.aFVGHYRKtry-ioZjDEba_WoXjTtJ95dle8ihkeO_O-E
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/2e3c24e3-f576-4782-bcb1-6862d0f7a7ff?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzV9.aFVGHYRKtry-ioZjDEba_WoXjTtJ95dle8ihkeO_O-E" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: 
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 181
guid 9b9133e7-fde3-441f-97e3-e5b186ab0a3f
created_at 2016-01-19 19:41:15 UTC
updated_at
timestamp 2016-01-19 19:41:15 UTC
type audit.space.delete-request
actor uaa-id-255
actor_type user
actee 2e3c24e3-f576-4782-bcb1-6862d0f7a7ff
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 2b482195-bbde-48d1-b80e-e49833246a00
space_guid 2e3c24e3-f576-4782-bcb1-6862d0f7a7ff
actor_name email-191@somedomain.com
actee_name name-1951