Skip to main content

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

AttributesRequired / OptionalTypeDefinition
classRequiredStringType of subscription. This can be one of the following values.
  • AndroidSubscriber. Forwards events to a Google device.
  • iOSSubscriber . Forwards events to an Apple device.
  • WebSocketSubscriber . Forwards events to a WebSocket service.
filterListRequiredArray of objectsOne or more filters. This can be a predefined filter or a full description of a new filter.
 filterRequired if predefinedFilterName is not specifiedObjectInformation about event filters
  eventFilterOptionalArray of objectsInformation about the types of events to filter
   filterOptionalObjectInformation about each event filter
    categoriesOptionalArray of stringsEvent categories. This can be one of the following values.
  • BULLETIN. Sends notification about new bulletins.
  • GENERAL. Sends notifications about audit events, based on the selected event classes and severities
  • STATUS_CHANGE. Sends notifications about changes in status.
  • STATUS_UPDATE
  • WARRANTY. Send notifications about warranties.
    componentIDsOptionalArray of stringsList of component IDs. If empty, all components are accepted.
    sourceIDsOptionalArray of stringsList of source IDs. If empty, all sources are accepted.
    typeSeverityOptionalArray of objectsEvent severity and type

If both sourceIDs and componentsIDs are empty, all events that match the typeSeverity filter is forwarded.

     severityOptionalStringEvent severity. This can be one of the following values.
  • Unknown. The severity is unknown.
  • Informational. Informational
  • Warning. User can decide if action is needed.
  • Minor. Action is needed, but the situation is not serious at this time.
  • Major. Action is needed now.
  • Critical. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).
  • Fatal. A non-recoverable error has occurred.
     typeOptionalStringEvent type. This can be one of the following values.
  • Unknown
  • Audit
  • Cooling
  • Power
  • Disks. Storage
  • Memory
  • Processor
  • System. Rack or tower server
  • Test
  • Adaptor. Adapter card
  • Expansion. Expansion board
  • IOModule. Flex System switch
  • Blade. Flex System server
  • Switch. switch
  eventFilterDescriptionOptionalStringFilter description
  eventFilterNameOptionalStringFilter name
 matchEveryCoreEventOptionalBooleanIndicates whether this filter accepts all core events. This can be one of the following values.
  • true. Forward all core events
  • false
 matchEverySystemOptionalBooleanIndicates whether this filter must match every event from every device. This can be one of the following values.
  • true. Forward events for all managed devices.
  • false
 matchEverythingOptionalBooleanIdentifies whether the service forwarder is set to match any manageable device. This can be one of the following values.
  • true. The service forwarder is set to match any manageable device.
  • false. The service forwarder is not set to match any manageable device.
 predefinedFilterNameRequired if filter is not specifiedStringName of predefined event filter. This can be one of the following values.
  • Match All Critical
  • Match All Warning
phoneUIDRequiredString(Android and iOS push services only) Displayable phone ID
preferredLanguageOptionalStringPreferred language for the push notification payload. This can be one of the following values.
  • en. English
  • de. German
  • es. Spanish
  • fr. French
  • it. Italian
  • ja. Japanese
  • ko. Korean
  • pt. Brazilian Portuguese
  • zh. Simplified Chinese
  • zh-hant. Traditional Chinese
registrationIDOptionalString(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 Settings > About > Push registration ID.
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

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA 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.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

None