Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/284c9d6e-bb24-4560-86c3-e71666e4cb25?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/284c9d6e-bb24-4560-86c3-e71666e4cb25?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwOSIsImVtYWlsIjoiZW1haWwtNzNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.LCGQ_26dFR0BeuMv33aVnrjV9XUMuJUD7hWpILgvuME" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: 54e2da3d-490c-4ee2-b9c2-308ebf731bfe
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 10
guid af0886e3-fb71-44e7-b837-5d3b54b85581
created_at 2016-04-16 01:23:47 UTC
updated_at
timestamp 2016-04-16 01:23:47 UTC
type audit.space.delete-request
actor uaa-id-109
actor_type user
actee 284c9d6e-bb24-4560-86c3-e71666e4cb25
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 93cd2396-979c-48e1-8f55-f8fa53c80e03
space_guid 284c9d6e-bb24-4560-86c3-e71666e4cb25
actor_name email-73@somedomain.com
actee_name name-233