Skip to main content
ONTAP Automation

List the EMS log events

Contributors dmp-netapp

You can retrieve all event notification messages or only those with specific characteristics.

HTTP method and endpoint

This REST API call uses the following method and endpoint.

HTTP method Path

GET

/api/support/ems/events

Processing type

Synchronous

Additional input parameters for the Curl examples

In addition to the parameters common with all REST API calls, the following parameters are also used in the curl examples for this step.

Parameter Type Required Description

fields

Query

No

Used to request specific fields to be included in the response.

max_records

Query

No

Can be used to limit the number of records returned in a single request.

log_message

Query

No

Used to search for a specific text value and only return the matching messages.

message.severity

Query

No

Limit the returned messages to those with a specific severity such as alert.

Curl example: Return the latest message and the name value
curl --request GET \
--location "https://$FQDN_IP/api/support/ems/events?fields=message.name&max_records=1" \
--include \
--header "Accept: */*" \
--header "Authorization: Basic $BASIC_AUTH"
Curl example: Return a message containing specific text and severity
curl --request GET \
--location "https://$FQDN_IP/api/support/ems/events?log_message=*disk*&message.severity=alert" \
--include \
--header "Accept: */*" \
--header "Authorization: Basic $BASIC_AUTH"
JSON output example
{
  "records": [
    {
      "node": {
        "name": "malha-vsim1",
        "uuid": "da4f9e62-9de3-11ec-976a-005056b369de",
        "_links": {
          "self": {
            "href": "/api/cluster/nodes/da4f9e62-9de3-11ec-976a-005056b369de"
          }
        }
      },
      "index": 4602,
      "time": "2022-03-18T06:37:46-04:00",
      "message": {
        "severity": "alert",
        "name": "raid.autoPart.disabled"
      },
      "log_message": "raid.autoPart.disabled: Disk auto-partitioning is disabled on this system: the system needs a minimum of 4 usable internal hard disks.",
      "_links": {
        "self": {
          "href": "/api/support/ems/events/malha-vsim1/4602"
        }
      }
    }
  ],
  "num_records": 1,
  "_links": {
    "self": {
      "href": "/api/support/ems/events?log_message=*disk*&message.severity=alert&max_records=1"
    },
    "next": {
      "href": "/api/support/ems/events?start.keytime=2022-03-18T06%3A37%3A46-04%3A00&start.node.name=malha-vsim1&start.index=4602&log_message=*disk*&message.severity=alert"
    }
  }
}