POST /events/notifications/{pusher_type}/subscriptions
Use this method to create a subscription that is used to forward events to mobile devices or WebSocket service.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/events/notifications/{pusher_type}/subscriptions
where {pusher_type} is the type of push notification service. This can be one of the following values.
- AndroidPusher. Google device push service
- iOSPusher. Apple device push service
- WebSocketPusher. WebSocket servic
Query parameters
None
Request body
Attributes | Required / Optional | Type | Definition | |||||
---|---|---|---|---|---|---|---|---|
class | Required | String | Type of subscription. This can be one of the following values.
| |||||
filterList | Required | Array of objects | One or more filters. This can be a predefined filter or a full description of a new filter. | |||||
filter | Required if predefinedFilterName is not specified | Object | Information about event filters | |||||
eventFilter | Optional | Array of objects | Information about the types of events to filter | |||||
filter | Optional | Object | Information about each event filter | |||||
categories | Optional | Array of strings | Event categories. This can be one of the following values.
| |||||
componentIDs | Optional | Array of strings | List of component IDs. If empty, all components are accepted. | |||||
sourceIDs | Optional | Array of strings | List of source IDs. If empty, all sources are accepted. | |||||
typeSeverity | Optional | Array of objects | Event severity and type If both sourceIDs and componentsIDs are empty, all events that match the typeSeverity filter is forwarded. | |||||
severity | Optional | String | Event severity. This can be one of the following values.
| |||||
type | Optional | String | Event type. This can be one of the following values.
| |||||
eventFilterDescription | Optional | String | Filter description | |||||
eventFilterName | Optional | String | Filter name | |||||
matchEveryCoreEvent | Optional | Boolean | Indicates whether this filter accepts all core events. This can be one of the following values.
| |||||
matchEverySystem | Optional | Boolean | Indicates whether this filter must match every event from every device. This can be one of the following values.
| |||||
matchEverything | Optional | Boolean | Identifies whether the service forwarder is set to match any manageable device. This can be one of the following values.
| |||||
predefinedFilterName | Required if filter is not specified | String | Name of predefined event filter. This can be one of the following values.
| |||||
phoneUID | Required | String | (Android and iOS push services only) Displayable phone ID | |||||
preferredLanguage | Optional | String | Preferred language for the push notification payload. This can be one of the following values.
| |||||
registrationID | Optional | String | (Android and iOS push services only) Unique registration ID for a mobile device. You can find the push registration ID from the Lenovo XClarity Mobile app by tapping . |
The following example creates a subscription for an Android device:
{
"class": "AndroidSubscriber",
"filterList": [{
"predefinedFilterName": "Match All Critical"
}],
"phoneUID": "P121",
"preferredLanguage": "en",
"registrationID": "df1dbe86bc811ddb57d76ca69804a56c8ba74a56a5231715304b95a67ec00fbe"
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
401 | Unauthorized | The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
None
Give documentation feedback