Delete subscriptions of the logged-in user or of a specified group

The delete subscriptions of the logged-in user or of a specified group request allows the client application to delete all subscriptions of the logged-in user or of a specified group.

Delete subscriptions of the logged-in user or of a specified group describes the API structure for delete all the subscriptions of the logged-in user or of a specified group.

Table 1. Delete subscriptions of the logged-in user or of a specified group
Title Delete subscriptions of the logged-in user or of a specified group
URL http://<impact_url>:port/m2m/deletesubscriptionsforgroup?type=<eventtype>&groupName=<groupName>
Method DELETE
Content-Type application/json
URL Params

The following are the URL parameters:

  • type:[string]: Specifies the subscription event type for deletion. Valid values are:

    • resources: For resource events.
    • lifecycleEvents: For lifecycle events.
  • groupName:[string]: Specifies the name of the IMPACT IoT group for which a given type of subscription needs to be deleted. It is an optional parameter.

    Note:
    • If a groupName is not specified, the subscriptions of the logged-in user is deleted.
    • If a groupName is specified, API checks whether logged-in user access to the group and
      • Deletes subscriptions for the specified group, if logged-in user has access to the group.
      • Displays the following error message, if logged-in user does not have access to the group:

        Unauthorized group
Data Params msg[string]: Success or failure message
Success Code
Response Code: 200
Error Code
401: Unauthorized 
403: Forbidden 
400: Bad request 
404: Not found
Sample Call

Curl:


curl -X DELETE --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' 'http://<impact_url>/m2m/deletesubscriptionsforgroup?type=resources&groupname=DM.MFORM'
} 

Response Body:


{
  "msg": "Success","code":1000
}
Notes None