Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/1ea391c4-40b7-468b-b77e-3f278d2a7f1a?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/1ea391c4-40b7-468b-b77e-3f278d2a7f1a?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzIiwiZW1haWwiOiJlbWFpbC0xM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk2fQ.gLijDqD1LylIvrUUemF95Sol5eurEp4vTfnfBnBJRJ0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: b7c90adc-44cd-450a-9dd3-f50385a7a48c
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 6
guid 7cff0ed3-d62b-4bef-a387-e03f691a3c68
created_at 2015-10-13 17:31:36 UTC
updated_at
timestamp 2015-10-13 17:31:36 UTC
type audit.space.delete-request
actor uaa-id-13
actor_type user
actee 1ea391c4-40b7-468b-b77e-3f278d2a7f1a
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid ed801223-c7e5-4830-aac4-1c7253bf6fcf
space_guid 1ea391c4-40b7-468b-b77e-3f278d2a7f1a
actor_name email-13@somedomain.com
actee_name name-78