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/b278c601-56d0-4a3b-a0b8-ca726a345b7d

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

cURL

curl "https://api.[your-domain.com]/v2/services/b278c601-56d0-4a3b-a0b8-ca726a345b7d" -d '' -X DELETE \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMCIsImVtYWlsIjoiZW1haWwtMTk2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MTl9.nhDouEx2GjUiuPpaO2TG2XDYehkRO1i1aw17Dma2rD8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

202 Accepted

Body

{
  "metadata": {
    "guid": "a8d45fcb-f75d-4818-8826-6da07ed83574",
    "created_at": "2016-05-12T00:45:19Z",
    "url": "/v2/jobs/a8d45fcb-f75d-4818-8826-6da07ed83574"
  },
  "entity": {
    "guid": "a8d45fcb-f75d-4818-8826-6da07ed83574",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f039edef-510e-4604-ab56-0c5051b77f86
Content-Length: 270
X-Content-Type-Options: nosniff