Create lifecycle/resource events subscription
The create lifecycle/resource events subscription request allows the client application to subscribe to the lifecycle/resource events of all the endpoints and gateways pertaining to a particular group. This request allows the client applications to specify the conditions for the subscription.
Create lifecycle/resource events subscription describes the API structure for creating lifecycle/resource event subscription.
| Title | Create lifecycle/resource events subscription |
|---|---|
| URL | http://<impact_url>/m2m/subscriptions?type=[resources/GWresources/lifecycleEvents/GWlifecycleEvents] |
| Method | POST |
| Content-Type | application/json |
| URL Params | The following are the URL parameters:
Example
payload for Device-Level
Subscription: |
| Data Params |
The following are the data parameters:
|
| Success Code |
Response Code: 202 |
| Error Code |
401 : Unauthorized 403 : Forbidden 404 : Not Found |
| Sample Call | Lifecycle subscription example for particular manufacturer data (make &
model) Curl: Response
Body:Lifecycle
subscription for particular list of serial
numbersCurl: Response
Body:HTTP
Request payload at
Group-Level HTTP Request payload at Device-Level |
| Notes |
While setting subscription, IMPACT IoT checks the JSON format of the subscription payload only. At the time of setting of pre-subscriptions, IMPACT IoTdoes not have any information about the nature or resource model of the endpoint. Moreover, the endpoints defined in pre-subscriptions may or may not register with the system in future. |