Delete either resources or lifecycle events subscription

The delete either resources or lifecycle events subscription request allows the client application to unsubscribe the notifications of the observed resources or lifecycle events.

Delete either resources or lifecycle events subscription describes the API structure for deleting either resources or lifecycle events subscription.

Table 1. Delete either resources or lifecycle events subscription
Title Delete either resources or lifecycle events subscription
URL http://<impact_url>/m2m/subscriptions/{subscriptionId}
Method DELETE
Content-Type application/json
URL Params

subscriptionId:[string]: Specifies the subscription ID that needs to be deleted.

Data Params

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

Success Code
Response Code: 200
Error Code
204 : No Content 
401 : Unauthorized 
403 : Forbidden
Sample Call

Curl:

curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/subscriptions/b1ceb04a-efd9-4cbd-90d3-992c036f04c8'
Response Body:
{
  "msg": "Success", "code":1000
}
Notes

In case of resource related subscription, if this application was the last one observing one of the resources defined in that subscription a cancellation is be sent to the relevant devices if required by the device’s protocol.

However, the answer to this request does not depend on the result of any cancellation. IMPACT removes the subscription from its internal repository and responds that the request is accepted. Any possible cancellations are executed later, independently, on best effort. IMPACT ensures that the client application does not receive any notification for the resources that were defined in the deleted subscription.