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/0c3eaa05-f3b9-479d-8c16-a3e33fee084f

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

cURL

curl "https://api.[your-domain.com]/v2/services/0c3eaa05-f3b9-479d-8c16-a3e33fee084f" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM1fQ.ps87T2TX7ayAbhbl1XYW4lgh5uz9CJTW1PTK_pJRibY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

202 Accepted

Body

{
  "metadata": {
    "guid": "ef041b81-c373-49f3-9550-bd0ab4d95289",
    "created_at": "2016-04-06T00:17:15Z",
    "url": "/v2/jobs/ef041b81-c373-49f3-9550-bd0ab4d95289"
  },
  "entity": {
    "guid": "ef041b81-c373-49f3-9550-bd0ab4d95289",
    "status": "queued"
  }
}

Headers

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