PUT /events/notifications/subscriptions

Use this method to modify a subscription that is used to forward events to mobile devices or WebSocket service.

Authentication

Authentication with user name and password is required.

Request URL

PUT https://{management_server_IP}/events/notifications/subscriptions

Query parameters

None

Request body

Attributes Required / Optional Type Definition
action Required String Action to perform. This can be one of the following values.
  • edit. Modify the subscription properties
class Required String Type 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.
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 the 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.
  • 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.
        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.
  • 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.
          type Optional String Event 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
    eventFilterDescription Optional String Filter description
    eventFilterName Optional String Filter name
  matchEveryCoreEvent Optional Boolean Indicates whether this event filter accepts all core events
  matchEverySystem Optional Boolean Indicates whether this event filter must match every event from every managed device
  matchEverything Optional Boolean Indicates whether this event filter matches all events
  predefinedFilterName Required if filter is not specified String The name of predefined event filter. This can be one of the following values:
  • Match All Critical
  • Match All Warning
phoneUID Required String (Android and iOS push services only) The displayable phone ID
preferredLanguage Optional String Preferred 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
registrationID Optional String (Android and iOS push services only) The 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 modifies a subscription that is used to forward events to mobile devices or WebSocket service.
{
    "action": "add"
    "class": "AndroidSubscriber",	
    "filterList": [{ 
      "predefinedFilterName": "Match All Critical"
   }],
   "phoneUID": "fr2Z6X ... mwgqqs",
   "preferredLanguage": "en",
   "registrationID": "fr2Z6X5_w38:APA91bEkN1J0nMFxZmcLuT4NMOWvFGJ0TTZsUTrXmYmmCzLddf
                      _iD7tfnovHqzB0wqIz5mfwg9JBSLL0A96DdqDRby92ld2_FfwRf4T8ef_AGLydq
                      D0fd3F_faIXYmWQmW0Fymwgqqs"
}

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