Delete a Target:

POST /targets/actions/delete

Remove a target from a ThingSpace account.

See also:
Create a target
Query targets

Uses and Requirements

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/cc/v1/targets/actions/delete

Resource Path and Query Parameters

None.

Header Parameters

The request header must contain a current ThingSpace authorization token and a current VZ-M2M session token, and must set the content-type to JSON.

 

Property Name Data Type Description
Authorization
required
string HTTP Authorization request header containing a valid ThingSpace Bearer token.
VZ-M2M-Token
required
string A valid session token returned by a Connectivity Management API POST /session/login request using the account’s UWS credentials.
Content-Type
required
string Must be application/json.

Request Body

The request body identifies the target to delete.

Property Name Data Type Description
accountidentifier
required
JSON object The ID of the authenticating billing account, in the format {"billingaccountid":"1234567890-12345"}.
resourceidentifier
required
JSON object The ID of the target to delete, in the format {"id": "dd1682d3-2d80-cefc-f3ee-25154800beff"}.

Example Request

curl -X POST \
  https://thingspace.verizon.com/api/cc/v1/targets/actions/delete \
  -H 'Authorization: Bearer 225aec324bb619d10101ca905fd2479e' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'VZ-M2M-Token: 85d73f80-3127-4d04-81ae-82497cc557dd' \
  -d '{
    "accountidentifier": {"billingaccountid":"1223334444-00001"},
    "resourceidentifier": {"id": "aef1d746-16b1-689b-ee9f-45c34960a427"}
}'

Success Responses

Status 204

Target deleted successfully. The response has no body.

Failure Responses

Status 4xx

All error messages are returned in this format:

{
  "error": "error code string",
  "error_description": "error message string",
  "cause": "further explanation"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.