Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/3450f6c0-25fd-4a0d-aa0d-b144008e9d7f?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/3450f6c0-25fd-4a0d-aa0d-b144008e9d7f?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQiLCJlbWFpbCI6ImVtYWlsLTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY3NX0.fV1k6AhL9MNr7nKrWtkIiIxftQFf_yAvvittxq6Aq9M" \
	-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 2
guid 6a56dce5-cf0c-480f-9c34-ca0c42650654
created_at 2015-12-22 18:27:55 UTC
updated_at
timestamp 2015-12-22 18:27:55 UTC
type audit.space.delete-request
actor uaa-id-4
actor_type user
actee 3450f6c0-25fd-4a0d-aa0d-b144008e9d7f
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid c26da5ad-d3ba-4295-8c20-488ad02af25e
space_guid 3450f6c0-25fd-4a0d-aa0d-b144008e9d7f
actor_name email-4@somedomain.com
actee_name name-12