Home
Version 3
Services API

Services API

Delete a Particular Service

DELETE /v2/services/:guid

Deleting with async not set to true will return a 204 status code and an empty response body.

Request

Route

DELETE /v2/services/a11436db-c23d-4843-9972-5636b3596631

Parameters

Name Description Valid Values Example Values
async Will run the delete request in a background job. Recommended: 'true'.
purge Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0OCIsImVtYWlsIjoiZW1haWwtMjUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTB9.baLrrFsSVePHHe64hXGn2_hvFImguqGvc_qhjNhdu6Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/services/a11436db-c23d-4843-9972-5636b3596631" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0OCIsImVtYWlsIjoiZW1haWwtMjUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTB9.baLrrFsSVePHHe64hXGn2_hvFImguqGvc_qhjNhdu6Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

202 Accepted

Body

{
  "metadata": {
    "guid": "3ffcf7c0-8b56-4e48-b94b-17d076f69063",
    "created_at": "2016-04-22T19:33:30Z",
    "url": "/v2/jobs/3ffcf7c0-8b56-4e48-b94b-17d076f69063"
  },
  "entity": {
    "guid": "3ffcf7c0-8b56-4e48-b94b-17d076f69063",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ef4ac430-763f-4c5c-923b-a912fafc6a51
Content-Length: 270
X-Content-Type-Options: nosniff