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/707d871f-008b-4b9e-8295-2e090d050303

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

cURL

curl "https://api.[your-domain.com]/v2/services/707d871f-008b-4b9e-8295-2e090d050303" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkxIiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI1fQ.KlLs_Qf0tAyPD4dA9FQUD8m0KhGW8Wupkg0e6vbmo9M" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

202 Accepted

Body

{
  "metadata": {
    "guid": "976f65a0-b0d8-4da0-be2c-2438e29d2d98",
    "created_at": "2016-04-16T01:23:45Z",
    "url": "/v2/jobs/976f65a0-b0d8-4da0-be2c-2438e29d2d98"
  },
  "entity": {
    "guid": "976f65a0-b0d8-4da0-be2c-2438e29d2d98",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3c1c07ae-d366-45f7-918c-606b9c60c378
Content-Length: 270
X-Content-Type-Options: nosniff