Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/551f860e-2ae4-48bd-aa48-92eff3f4c4e4?

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIwfQ.fj-zi0K6zj0sPSJ-_kBf1V4KCsU_qRJSo3ywtJuclTY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/551f860e-2ae4-48bd-aa48-92eff3f4c4e4?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIwfQ.fj-zi0K6zj0sPSJ-_kBf1V4KCsU_qRJSo3ywtJuclTY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: b4c960d7-d9eb-410f-a539-ad063a2210b8
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 5
guid bfb9fa10-1d9a-4eba-b280-3f3727ddc05a
created_at 2015-10-07 00:35:20 UTC
updated_at
timestamp 2015-10-07 00:35:20 UTC
type audit.space.delete-request
actor uaa-id-18
actor_type user
actee 551f860e-2ae4-48bd-aa48-92eff3f4c4e4
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 2df06e75-db3f-4d0c-9815-5154fba3bdff
space_guid 551f860e-2ae4-48bd-aa48-92eff3f4c4e4
actor_name email-18@somedomain.com
actee_name name-73