Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid?

Request

Route

DELETE /v2/spaces/6bafbc49-246c-484b-a192-763b7fad9e5c?

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/6bafbc49-246c-484b-a192-763b7fad9e5c?" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTJ9.7GHGZGHGiVcfRIt-fK9gICuH28ormty4aUEikKEg6c4" \
	-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 37
guid 97b56f4e-d93a-4fda-9bfd-60c77ba4ecf4
created_at 2016-04-06 00:17:32 UTC
updated_at
timestamp 2016-04-06 00:17:32 UTC
type audit.space.delete-request
actor uaa-id-286
actor_type user
actee 6bafbc49-246c-484b-a192-763b7fad9e5c
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 6136519b-b733-4551-8497-8236b4d0296d
space_guid 6bafbc49-246c-484b-a192-763b7fad9e5c
actor_name email-194@somedomain.com
actee_name name-1004