get /events

Gets all events in an organization for a specified time interval. The list of events includes anomalies detected by Edge and any triggered alerts. The alerts can include both fixed and anomaly alerts.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute. For more information and examples of this API, see View metrics data using the API.

HTTP request

https://apimonitoring.enterprise.apigee.com/metrics/events

Query Parameters

org (required)

string

Organization name.

from

string
Default value
"-1h"

Start of the time interval for which alerts should be fetched. Defaults to the current time minus one hour. Required for latency metrics.

to

string
Default value
"now"

End of the time interval for which alerts should be fetched. Defaults to the current time.

alertId

string

Filter alert history by the specified alert definition ID. To get a list of alert IDs, see Get alerts.

env

string

Filter events by the specified environment.

name

string

Filter events by the specified name. The semantics of name depends on the type of the event.

region

string

Filter events by the specified region.

type

string

Filter events by the specified type. Valid values include alert and anomaly.

alertType

string

Filter alert events by the specified alertType. The only valid value is runtime, which is the default.

alertSubType

string

Filter alert events by the specified alertSubType. Valid values include fixed and anomaly. By default returns all alerts for the given type.

Response Types

default: 

Unexpected error

Body

application/json
Error
error

string

Error message

200: 

Query results

Body

application/json
array
Eventsarray
Event
id

string

Alert ID.

shared_id

string

TBD

entity_key

string

Entity key.

entity_value

string

Entity value.

dependent_entity_key

string

Dependent entity key.

dependent_entity_value

string

Dependent entity value.

component

string

Component.

pod

string

Pod.

region

string

Region.

organization

string

Organization name.

environment

string

Environment name.

name

string

Name of the alert.

type

string

Type of event. Valid values include alert or anomaly.

source

string

Source of the alert.

raw_payload

any

Raw payload of the alert. For details, see Alert.

time

string

Time the alert was triggered.

Authentication Requirements

For OAuth, enter the following in the Key field: Bearer %your-token% (see https://docs.apigee.com/api-platform/system-administration/using-oauth2#get-the-tokens)

Key location: header
Parameter name: Authorization

Try this API

Request parameters
org
from
to
alertId
env
name
region
type
alertType
alertSubType
Credentials
OAuth
For OAuth, enter the following in the Key field: Bearer %your-token% (see https://docs.apigee.com/api-platform/system-administration/using-oauth2#get-the-tokens)