Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/ee686986-cd5c-4357-b970-4191bcdd9023?

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.eyJ1c2VyX2lkIjoidWFhLWlkLTgxIiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0MjYwNjM5fQ.R-ywm9_sUG-XzuRYtT5J-k_IoIQL-YCUIRMvVrH9rrk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/ee686986-cd5c-4357-b970-4191bcdd9023?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgxIiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0MjYwNjM5fQ.R-ywm9_sUG-XzuRYtT5J-k_IoIQL-YCUIRMvVrH9rrk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: 7a143003-0a57-4cda-8808-a9d542340195
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 2
guid e54165e6-4452-4889-98d9-658516940b9c
created_at 2015-09-30 23:30:39 UTC
updated_at
timestamp 2015-09-30 23:30:39 UTC
type audit.space.delete-request
actor uaa-id-81
actor_type user
actee ee686986-cd5c-4357-b970-4191bcdd9023
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 98bb9b66-71b1-4d48-921e-abe08adf8f25
space_guid ee686986-cd5c-4357-b970-4191bcdd9023
actor_name email-46@somedomain.com
actee_name name-1117