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/10782583-ff9a-4662-93a5-b814322c9654

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.eyJ1c2VyX2lkIjoidWFhLWlkLTkwIiwiZW1haWwiOiJlbWFpbC04OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjI4fQ.ZHD-pPDZ90w6Mjz29-56hJA0sVj-ro9giePlj-Pk3LA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/services/10782583-ff9a-4662-93a5-b814322c9654" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkwIiwiZW1haWwiOiJlbWFpbC04OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjI4fQ.ZHD-pPDZ90w6Mjz29-56hJA0sVj-ro9giePlj-Pk3LA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

202 Accepted

Body

{
  "metadata": {
    "guid": "e3e1105c-8acd-4ee4-8c0b-7a7bd4fc3bd3",
    "created_at": "2016-02-19T02:03:48Z",
    "url": "/v2/jobs/e3e1105c-8acd-4ee4-8c0b-7a7bd4fc3bd3"
  },
  "entity": {
    "guid": "e3e1105c-8acd-4ee4-8c0b-7a7bd4fc3bd3",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 270
X-Content-Type-Options: nosniff