Home
Version 3
Spaces API

Spaces API

Delete a Particular Space

DELETE /v2/spaces/:guid

Request

Route

DELETE /v2/spaces/b164590a-ee03-453b-820f-d9352ef04261

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQiLCJlbWFpbCI6ImVtYWlsLTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MjYwMTUyNX0.xgQoP1O2NthTK6Ou4L9f3bzNSLjizlr0aoyKU-Ai-NQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/b164590a-ee03-453b-820f-d9352ef04261" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQiLCJlbWFpbCI6ImVtYWlsLTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MjYwMTUyNX0.xgQoP1O2NthTK6Ou4L9f3bzNSLjizlr0aoyKU-Ai-NQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

204 No Content

Headers

X-VCAP-Request-ID: e3d81af2-c834-43d8-a3d8-e00e21f7cb90
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.delete-request

Attribute Name Value
id 3
guid ee58c626-8fc8-487d-bded-e7707e0eb44e
created_at 2015-09-11 18:38:45 UTC
updated_at
timestamp 2015-09-11 18:38:45 UTC
type audit.space.delete-request
actor uaa-id-4
actor_type user
actee b164590a-ee03-453b-820f-d9352ef04261
actee_type space
metadata
{
  "request": {
    "recursive": false
  }
}
space_id
organization_guid 0a524063-6fbf-4bb1-a2b8-d10a146cee2e
space_guid b164590a-ee03-453b-820f-d9352ef04261
actor_name email-4@somedomain.com
actee_name name-12