Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/8ecf7d19-7b3b-43ce-b827-a304b5732c82?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/8ecf7d19-7b3b-43ce-b827-a304b5732c82?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NyIsImVtYWlsIjoiZW1haWwtMjc0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NTB9.t4I9RqBkqtHrLd32bXAvoHYoEtBOJGpMbEB6QeDUELE" \
	-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 27
guid d43b0520-8862-40a6-8529-941bcb0a4a19
created_at 2016-03-14 22:30:49 UTC
updated_at
timestamp 2016-03-14 22:30:49 UTC
type audit.space.delete-request
actor uaa-id-377
actor_type user
actee 8ecf7d19-7b3b-43ce-b827-a304b5732c82
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 49e2e8d4-81a1-4341-bcba-54ee9c21e8ec
space_guid 8ecf7d19-7b3b-43ce-b827-a304b5732c82
actor_name email-274@somedomain.com
actee_name name-2348