Delete the resource of an endpoint

Delete the resource of an endpoint describes the API structure for the deleting the resources of an endpoint.

Table 1. Delete the resource of an endpoint
Title Delete the resource of an endpoint
URL http://<impact_url>/m2m/endpoints/{serialNumber}/{resourcePath}
Method DELETE
Content-Type application/json
URL Params

The following are the URL parameters:

  • serialNumber:[string]: Specifies the serial number of device for which resource is to be deleted

  • resourcePath: Specifies the URI of the resource on which the client application wants to perform the delete operation. Depending on the nature of the request, it can consists of one or more of the following parameters in the defined syntax:

    • objectId:[string]: Specifies the unique identity of the object within the client.

    • objectInstanceId:[string]: Specifies the unique identity of the object instance of the object within the client.

    • resourceId:[string]: Specifies the unique identity of the resource within the object.

    The possible input syntax for resourcePath are:

    • ObectId
    • ObectId/InstanceId
    • ObectId/InstanceId/ResourceID
    Note:

    If a resource path does not exist for the device, yet it is mentioned in the request, then IMPACT does not validate the resource path and accepts the request. Final response to callback URL contains the result code and error message, if any.

  • needNotification: [Boolean]: The flag that indicates where a wake up trigger is required, to process the command.

    The default value is false. When set to false, the wake up trigger is not sent to the device.

Data Params

requestId:[string]: Specifies the request ID provided in case of valid and accepted request

msg:[string] : info/warning/error message

Success Code
Response Code: 202
Error Code
400 : Bad Request 
401 : Unauthorized 
403 : Forbidden 
404 : Not Found
Sample Call

1. Delete the resources of an endpoint with object ID.

Curl:
curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/endpoints/010920163/3'
Response Body:
{
  "requestId": "7447c864-5fa7-4b80-a3bd-9a89ddd74d31",
  "msg": "Accepted"
}

2. Delete the resources of an endpoint with object ID and instance ID.

Curl:
curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/endpoints/010920163/3/0'
Response Body:
{
  "requestId": "4ccd4468-ffe6-43d0-834a-0d46e6bf2aa0",
  "msg": "Accepted"
}

3. Delete the resources of an endpoint with object ID, instance ID, and resource ID.

Curl:
curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/endpoints/010920163/3/0/7'
Response Body:
{
  "requestId": "d8e75a81-1530-4e5f-a949-8024eb207777",
  "msg": "Accepted"
}

4. Delete the resources of an endpoint with object ID, Instance ID, resource ID, and instance resource ID.

Curl:
curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/endpoints/010920163/3/0/7/0'
Response Body:
{
  "requestId": "6b4c66f8-e30e-42a7-b6b8-1abf0f47b449",
  "msg": "Accepted"
}
Notes None