Skip to main content
A newer release of this product is available.

Retrieve observed events

Contributors

GET /support/ems/events

Introduced In: 9.6

Retrieves a collection of observed events.

  • event log show

Parameters

Name Type In Required Description

log_message

string

query

False

Filter by log_message

message.severity

string

query

False

Filter by message.severity

message.name

string

query

False

Filter by message.name

index

integer

query

False

Filter by index

time

string

query

False

Filter by time

node.uuid

string

query

False

Filter by node.uuid

node.name

string

query

False

Filter by node.name

source

string

query

False

Filter by source

parameters.value

string

query

False

Filter by parameters.value

parameters.name

string

query

False

Filter by parameters.name

filter.name

string

query

False

Filter the collection returned using an event filter

  • Introduced in: 9.8

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.

  • Default value: 1

  • Max value: 120

  • Min value: 0

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

Number of records

records

array[records]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "records": [
    {
      "_links": {
        "action": [
          {
            "confirmation_message": {
              "arguments": [
                {
                  "code": "string",
                  "message": "string"
                }
              ],
              "code": "4",
              "message": "entry doesn't exist"
            },
            "description": {
              "arguments": [
                {
                  "code": "string",
                  "message": "string"
                }
              ],
              "code": "4",
              "message": "entry doesn't exist"
            },
            "href": "/api/resourcelink",
            "method": "PATCH",
            "name": "schedule",
            "parameters": [
              {
                "description": {
                  "arguments": [
                    {
                      "code": "string",
                      "message": "string"
                    }
                  ],
                  "code": "4",
                  "message": "entry doesn't exist"
                },
                "enum": [
                  "value-1",
                  "value-2"
                ],
                "format": "date-time",
                "help": {
                  "arguments": [
                    {
                      "code": "string",
                      "message": "string"
                    }
                  ],
                  "code": "4",
                  "message": "entry doesn't exist"
                },
                "items": {
                  "type": "string"
                },
                "maxItems": 0,
                "maxLength": 0,
                "maximum": 0,
                "minItems": 0,
                "minLength": 0,
                "minimum": 0,
                "name": "schedule-at",
                "param_in": "body",
                "title": {
                  "arguments": [
                    {
                      "code": "string",
                      "message": "string"
                    }
                  ],
                  "code": "4",
                  "message": "entry doesn't exist"
                },
                "type": "string",
                "validation_error_message": {
                  "arguments": [
                    {
                      "code": "string",
                      "message": "string"
                    }
                  ],
                  "code": "4",
                  "message": "entry doesn't exist"
                }
              }
            ],
            "title": {
              "arguments": [
                {
                  "code": "string",
                  "message": "string"
                }
              ],
              "code": "4",
              "message": "entry doesn't exist"
            }
          }
        ],
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "creation_time": "string",
      "history": [
        {
          "log_message": "string",
          "state": "resolving",
          "update_time": "string"
        }
      ],
      "index": 1,
      "last_update_time": "string",
      "log_message": "string",
      "message": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "callhome.spares.low",
        "severity": "emergency"
      },
      "node": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "node1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "num_occurrences": 0,
      "parameters": [
        {
          "name": "numOps",
          "value": "123"
        }
      ],
      "source": "string",
      "state": "resolving",
      "time": "string",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    }
  ]
}

Error

Status: Default, Error
Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

arguments

Name Type Description

code

string

Argument code

message

string

Message argument

confirmation_message

Confirmation message that is presented in user facing applications, confirming the action to take.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

description

Description of the action is presented in user facing applications.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

description

Description of the parameter that is presented in user facing applications.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

help

Help message of the parameter that is presented in user facing applications.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

title

Title of the parameter that is presented in user facing applications.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

validation_error_message

Error message that is presented in user facing applications, in cases where parameter validation fails.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

parameters

Name Type Description

description

description

Description of the parameter that is presented in user facing applications.

enum

array[string]

Specifies the possible values of the parameter.

exclusiveMaximum

boolean

Specifies whether the "maximum" value is excluded in the parameter value range.

exclusiveMinimum

boolean

Specifies whether the "minimum" value is excluded in the parameter value range.

format

string

An optional modifier that serves as a hint at the content and format of the parameter.

help

help

Help message of the parameter that is presented in user facing applications.

items

string

If the type of the parameter is an array, this specifies the type of items in the form of a JSON object, {"type":"type-value"}, where the type-value is one of the values for the type property.

maxItems

integer

Specifies the maximum length of an array type parameter.

maxLength

integer

Specifies the maximum length of a string type parameter.

maximum

integer

Specifies the maximum value of the parameter.

minItems

integer

Specifies the minimum length of an array type parameter.

minLength

integer

Specifies the minimum length of a string type parameter.

minimum

integer

Specifies the minimum value of the parameter.

name

string

Parameter name.

param_in

string

Specifies where the parameter is placed when invoking the action.

title

title

Title of the parameter that is presented in user facing applications.

type

string

Parameter type.

validation_error_message

validation_error_message

Error message that is presented in user facing applications, in cases where parameter validation fails.

request_body_template

JSON object describing the structure of the request body if arguments must be provided in the body when invoking the action. A JSON string value that takes the form of {parameter-name} must be substituted by user input values encoded as the appropriate JSON type. The following table gives examples where the parameter type is a string, an integer, and an array:

request_body_template value parameter value request body

{"name": "{user-name}"}

user-name="Joe"

{"name": "Joe"}

{"retry count": "{count}"}

count=10

{"retry_count": 10}

{"domains": "{dns_names}"}

dns_names=["dns-1", "dns-2"]

{"domains": ["dns-1", "dns-2"]}

Only JSON string values that start with a '{' and end with a '}' should be considered for parameter substitutions. A JSON string value such as "{user-name} is the syntax" should be treated as a literal string with no parameter substitution to be performed. Double curly braces '{{' and '}}' are used to escape parameter substitutions, therefore double curly braces must be converted to single curly braces. For example, "{{user-name}}" is converted to the JSON string value "{user-name}". Note that this rule only applies if a JSON string starts with '{{' and ends with '}}'. The following table provides examples of when parameter substitutions must not be performed:

request_body_template value request body

{"name": "{user-name} is bad"}

{"name": "{user-name} is bad"}

{"name": "{{user-name}}"}

{"name": "{user-name}"}

{"name": "{{user-name}} is bad"}

{"name": "{{user-name}} is bad"}

{"name": "{{{{user-name}}}}"}

{"name": "{{user-name}}"}

title

Title of the action that is presented in user facing applications.

Name Type Description

arguments

array[arguments]

Message arguments

code

string

Unique message code.

message

string

User message.

action

Name Type Description

confirmation_message

confirmation_message

Confirmation message that is presented in user facing applications, confirming the action to take.

description

description

Description of the action is presented in user facing applications.

href

string

URI on which to perform the action, using the HTTP method specified in the method property.

method

string

HTTP verb, such as PATCH, POST, used to perform the action.

name

string

Name of the action.

parameters

array[parameters]

Parameter list for the action.

request_body_template

request_body_template

JSON object describing the structure of the request body if arguments must be provided in the body when invoking the action. A JSON string value that takes the form of {parameter-name} must be substituted by user input values encoded as the appropriate JSON type. The following table gives examples where the parameter type is a string, an integer, and an array:

| request_body_template value | parameter value | request body

| {"name": "{user-name}"} | user-name="Joe" | {"name": "Joe"}

| {"retry count": "{count}"} | count=10 | {"retry_count": 10}

| {"domains": "{dns_names}"} | dns_names=["dns-1", "dns-2"] | {"domains": ["dns-1", "dns-2"]}

Only JSON string values that start with a '{' and end with a '}' should be considered for parameter substitutions. A JSON string value such as "{user-name} is the syntax" should be treated as a literal string with no parameter substitution to be performed. Double curly braces '{{' and '}}' are used to escape parameter substitutions, therefore double curly braces must be converted to single curly braces. For example, "{{user-name}}" is converted to the JSON string value "{user-name}". Note that this rule only applies if a JSON string starts with '{{' and ends with '}}'. The following table provides examples of when parameter substitutions must not be performed:

| request_body_template value | request body

| {"name": "{user-name} is bad"} | {"name": "{user-name} is bad"}

| {"name": "{{user-name}}"} | {"name": "{user-name}"}

| {"name": "{{user-name}} is bad"} | {"name": "{{user-name}} is bad"}

| {"name": "{{{{user-name}}}}"} | {"name": "{{user-name}}"}

title

title

Title of the action that is presented in user facing applications.

self

Name Type Description

href

string

Name Type Description

action

array[action]

Actions that can be performed to remediate the issue that the event instance is reporting. To perform an action, send a request to the href URL using the HTTP method with an appropriate set of parameter values.

self

self

action

Some automatic remediation actions included in the action link relations are links to the event instance itself, while others are to other public REST APIs. In cases where the action link points to the event instance itself, this property is used in a PATCH request body to trigger a remediation action. The value included as the value of the property depends on each remediation action.

history

Name Type Description

log_message

string

A formatted text string about the update.

state

string

State of the event instance when the update is raised.

update_time

string

Timestamp of the update.

Name Type Description

self

href

message

Name Type Description

_links

_links

name

string

Message name of the event. Returned by default.

severity

string

Severity of the event. Returned by default.

node

Name Type Description

_links

_links

name

string

uuid

string

parameters

Name Type Description

name

string

Name of parameter

value

string

Value of parameter

records

Name Type Description

_links

_links

action

action

Some automatic remediation actions included in the action link relations are links to the event instance itself, while others are to other public REST APIs. In cases where the action link points to the event instance itself, this property is used in a PATCH request body to trigger a remediation action. The value included as the value of the property depends on each remediation action.

actionable

boolean

Indicates whether the event instance currently has actions that can be performed.

creation_time

string

Timestamp of the event creation.

history

array[history]

History of updates to the event instance.

index

integer

Index of the event. Returned by default.

last_update_time

string

Timestamp of the last update to the event instance.

log_message

string

A formatted text string populated with parameter details. Returned by default. When changing the state of an event instance, include the 'state' property and this property in a PATCH request. The value of this property should describe why the state is changed.

message

message

node

node

num_occurrences

integer

Number of times the event has repeatedly reported the issue.

parameters

array[parameters]

A list of parameters provided with the EMS event.

source

string

Source

state

string

Indicates the event state. A stateful event tracks the state changes of a system condition and reflects the current system condition. This property and the 'action' property are mutually exclusive in a PATCH request. The state of an event instance can be changed to 'resolved' or 'closed' by sending a PATCH request with this property along with the 'log_message' property describing the reason. An event instance changes its state to 'resolving' only as a result of the user triggering an automatic remediation action, which is done by invoking an action specified in the 'action' link relation.

stateful

boolean

Indicates whether the event is stateful. A stateful event tracks the state changes of a system condition and reflects the current system condition while a stateless event simply reports a certain system condition that has occurred sometime in the past.

time

string

Timestamp of the event. Returned by default.

uuid

string

The UUID that uniquely identifies the event instance.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.