Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/1e9519ea-baad-433e-92de-2639563f2a8b?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/1e9519ea-baad-433e-92de-2639563f2a8b?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc0IiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ5NTMxNTA5fQ.5JeNV_r800Zzc1GmkXDxCyRA6USNRIYAjkSkVCNJr6M" \
	-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 18
guid 43650ced-9441-43b0-8db1-64f6e77ee225
created_at 2015-11-30 23:38:29 UTC
updated_at
timestamp 2015-11-30 23:38:29 UTC
type audit.space.delete-request
actor uaa-id-74
actor_type user
actee 1e9519ea-baad-433e-92de-2639563f2a8b
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 49db191b-f5f1-4096-8f9e-db0929984de8
space_guid 1e9519ea-baad-433e-92de-2639563f2a8b
actor_name email-41@somedomain.com
actee_name name-144