Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/0d69a090-9390-49f6-88cb-790caf3e7302?

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.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNyIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDJ9.zdK5c2fDyyBWdbIyRNZ9CsjKY0yeDwd4eZiMlKesC8E
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/0d69a090-9390-49f6-88cb-790caf3e7302?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNyIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDJ9.zdK5c2fDyyBWdbIyRNZ9CsjKY0yeDwd4eZiMlKesC8E" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: b9473fbf-bc86-496e-8050-1af587137b34
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 177
guid 5fa3aafa-d874-4e3f-96a7-657c81d110fc
created_at 2015-10-15 23:52:22 UTC
updated_at
timestamp 2015-10-15 23:52:22 UTC
type audit.space.delete-request
actor uaa-id-217
actor_type user
actee 0d69a090-9390-49f6-88cb-790caf3e7302
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 1c355ca7-9e91-4b98-a289-9ff565a17a06
space_guid 0d69a090-9390-49f6-88cb-790caf3e7302
actor_name email-121@somedomain.com
actee_name name-1443