Event Viewer API v1

Provides a list of portal-visible events stored in the Event Logger system.

Learn more:


Overview

Event Viewer records events completed through Luna Control Center that are available to site administrators, such as configuration changes, alerts, and log deliveries.

With the Event Viewer API, you can view a list of portal-visible events stored in the Event Logger system and related to a particular user account, optionally filtered by event type ID, date and time of an event, and event ID. You can also view all defined event types with related event definitions. The API allows you to use your tools to flexibly access to the same reporting features as in Event Viewer within Luna Control Center.

Who should use this API

Use the Event Viewer API if you want to extract event data for reporting purposes, or create an automated mechanism to manage your event data outside the Luna Control Center user interface. For example, you can use the API to batch extract the amount of event data that is difficult to manage manually in the Event Viewer user interface.

Getting Started

Before using the Event Viewer API for the first time:

  • Review Get Started on tools that Akamai provides for all its APIs.

  • Review Authorize Your Client to create your API access credentials and authorizations. As detailed in the The API Identity Model section, you then access the API using custom hostnames that looks like this: https://akzz-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX.luna.akamaiapis.net.

  • Review the Authorize Your Client section to make sure the identity under which you provision the API can access its full range of functionality. Use the Identity Management application to expand access if necessary, or the Identity Management API as a programmatic alternative.

To use this API, ensure that you have permission to access the Event Viewer user interface.

Hypermedia

This API includes Hypermedia links that appear on a page of event objects whenever the API’s response includes other pages that you can navigate to.

The following example from a listing of events provides direct links to the next and previous pages of events relative to the current page. The next page is referenced by a type ID of the last event on the current page. Similarly, the previous page is referenced by a type ID of the first event on the current page.

"links": [
    {
        "rel": "next",
        "href": "/event-viewer-api/v1/events?beforeEventId=038a9f69-121f-4248-acd2-74103012c680"
    },
    {
        "rel": "prev",
        "href": "/event-viewer-api/v1/events?afterEventId=68bb2c73-bf1b-4cb0-ae56-b4fcd7210317"
    },
    {
        "rel": "self",
        "href": "/event-viewer-api/v1/events"
    }
]

Resources

This section provides details on the Event Viewer API’s various operations and parameters.

API summary

Download the RAML descriptors for this API.

Operation Method Endpoint
Event Viewer API  
List Event Types GET event-viewer-api/v1/event-types
Events  
List Events GET event-viewer-api/v1/events{?eventTypeId,start,end,afterEventId,beforeEventId,username}

List event types

This operation returns all defined event types with related event definitions.

GET event-viewer-api/v1/event-types

Status 200 application/json

Response Body:

[
    {
        "eventTypeId": "16",
        "eventTypeName": "All Logins",
        "eventDefinitions": [
            {
                "eventDefinitionId": "415195",
                "eventName": "Login",
                "eventDescription": "A user logged in."
            }
        ]
    },
    {
        "eventTypeId": "198",
        "eventTypeName": "API Definition",
        "eventDefinitions": [
            {
                "eventDefinitionId": "800313",
                "eventName": "Update an Endpoint Resources Details",
                "eventDescription": "Update an Endpoint Resources Details."
            },
            {
                "eventDefinitionId": "892355",
                "eventName": "Create an Endpoint",
                "eventDescription": "Add a new Endpoint"
            },
            {
                "eventDefinitionId": "913159",
                "eventName": "Delete Endpoint Resource",
                "eventDescription": "Deletes an endpoint resource details."
            }
        ]
    }
]

List events

This operation returns one or more pages of portal-visible events stored in the Event Logger system and related to a particular user account. Each page lists 50 events. You can move between pages by using the ‘afterEventId’ and ‘beforeEventId’ query parameters or by clicking a relevant hypermedia link at the bottom of a page.

GET event-viewer-api/v1/events{?eventTypeId,start,end,afterEventId,beforeEventId,username}

Sample: event-viewer-api/v1/events?eventTypeId=50&start=2017-07-11T04%3A25%3A28&end=2017-07-13T06%3A05%3A00&afterEventId=626a345e–3a3f–49af–87ba-e60eff1e2f15&beforeEventId=626a345e–3a3f–49af–87ba-e60eff1e2f15&username=name

Parameter Type Sample Description
Optional query parameters
afterEventId String 626a345e-3a3f-49af-87ba-e60eff1e2f15 The unique identifier for the event. Use this parameter to view all events that occurred after the event with the specified event ID.
beforeEventId String 626a345e-3a3f-49af-87ba-e60eff1e2f15 The unique identifier for the event. Use this parameter to view all events that occurred before the event with the specified event ID.
end String 2017-07-13T06:05:00 The end date and time of the event. Use this parameter to view all events that occurred before the specified date and time.
eventTypeId Integer 50 The unique identifier for the event type. Use this parameter to view all events with the specified event type ID.
start String 2017-07-11T04:25:28 The start date and time of the event. Use this parameter to view all events that occurred after the specified date and time.
username String name The name of the user that created the event. Use this parameter to view all events generated by the specified user.

Status 200 application/json

Response Body:

{
    "events": [
        {
            "eventId": "b5ac4d16-8223-4cbd-86f3-f42f52a8f6ff",
            "eventTime": "2017-07-27T12:13:37.15Z",
            "eventData": [],
            "eventType": {
                "eventTypeId": "16",
                "eventTypeName": "All Logins",
                "eventDefinition": {
                    "eventDefinitionId": "415195",
                    "eventName": "Login",
                    "eventDescription": "A user logged in."
                }
            },
            "impersonator": true,
            "username": "-"
        },
        {
            "eventId": "5409ed6f-d532-4832-b2be-961a21380416",
            "eventTime": "2017-07-27T12:13:10.426Z",
            "eventData": [
                {
                    "key": "Email To",
                    "value": "aaa@akamai.com"
                },
                {
                    "key": "Start Time",
                    "value": "Thu, Jul 27, 12:13 GMT 2017"
                }
            ],
            "eventType": {
                "eventTypeId": "50",
                "eventTypeName": "Alert Activity",
                "eventDefinition": {
                    "eventDefinitionId": "169758",
                    "eventName": "Alert Fired",
                    "eventDescription": "The condition that this alert was set up to monitor has occurred."
                }
            },
            "impersonator": false,
            "username": "-"
        }
    ],
    "links": [
        {
            "rel": "next",
            "href": "/event-viewer-api/v1/events?beforeEventId=038a9f69-121f-4248-acd2-74103012c680"
        },
        {
            "rel": "prev",
            "href": "/event-viewer-api/v1/events?afterEventId=68bb2c73-bf1b-4cb0-ae56-b4fcd7210317"
        },
        {
            "rel": "self",
            "href": "/event-viewer-api/v1/events"
        }
    ]
}

Data

This section details the JSON objects that the Event Viewer API provides as data. For these read-only objects, the data members listed below are always present in the response objects.

The data schema tables below list membership requirements as follows:

Member is required to be present, regardless of whether the value is empty or null.
Member is optional, and may be omitted in some cases.
Member is excluded from the specified interaction context. It is either ignored, or causes an error.

Download the JSON schemas for this API.

Event

Encapsulates information about the event.

Download schema: event.json

Sample GET:

{
    "events": [
        {
            "eventId": "b5ac4d16-8223-4cbd-86f3-f42f52a8f6ff",
            "eventTime": "2017-07-27T12:13:37.15Z",
            "eventData": [],
            "eventType": {
                "eventTypeId": "16",
                "eventTypeName": "All Logins",
                "eventDefinition": {
                    "eventDefinitionId": "415195",
                    "eventName": "Login",
                    "eventDescription": "A user logged in."
                }
            },
            "impersonator": true,
            "username": "-"
        },
        {
            "eventId": "5409ed6f-d532-4832-b2be-961a21380416",
            "eventTime": "2017-07-27T12:13:10.426Z",
            "eventData": [
                {
                    "key": "Email To",
                    "value": "aaa@akamai.com"
                },
                {
                    "key": "Start Time",
                    "value": "Thu, Jul 27, 12:13 GMT 2017"
                }
            ],
            "eventType": {
                "eventTypeId": "50",
                "eventTypeName": "Alert Activity",
                "eventDefinition": {
                    "eventDefinitionId": "169758",
                    "eventName": "Alert Fired",
                    "eventDescription": "The condition that this alert was set up to monitor has occurred."
                }
            },
            "impersonator": false,
            "username": "-"
        }
    ],
    "links": [
        {
            "rel": "next",
            "href": "/event-viewer-api/v1/events?beforeEventId=038a9f69-121f-4248-acd2-74103012c680"
        },
        {
            "rel": "prev",
            "href": "/event-viewer-api/v1/events?afterEventId=68bb2c73-bf1b-4cb0-ae56-b4fcd7210317"
        },
        {
            "rel": "self",
            "href": "/event-viewer-api/v1/events"
        }
    ]
}

Event members

Member Type Description
eventData Event.eventData[] The map of user-defined keys and values that describe additional event data.
eventId String The unique identifier for the event.
eventTime String The date and time of the event.
eventType Event.eventType Encapsulates information about the event type.
impersonator Boolean Whether an impersonating user created the event.
username String The username of the user who created the event.
Event.eventData[] The map of user-defined keys and values that describe additional event data.
key String A key that specifies the event data type.
value String The value of a particular key.
Event.eventType Encapsulates information about the event type.
eventDefinition Event.eventType.eventDefinition Encapsulates information about the event type definition
eventTypeId String The ID of the event type.
eventTypeName String The name of the event type.
Event.eventType.eventDefinition Encapsulates information about the event type definition
eventDefinitionId String The ID of the event definition.
eventDescription String The description of the event.
eventName String The name of the event.

EventType

Encapsulates an event type with possible multiple event definitions.

Download schema: event-type.json

Sample GET:

[
    {
        "eventTypeId": "16",
        "eventTypeName": "All Logins",
        "eventDefinitions": [
            {
                "eventDefinitionId": "415195",
                "eventName": "Login",
                "eventDescription": "A user logged in."
            }
        ]
    },
    {
        "eventTypeId": "198",
        "eventTypeName": "API Definition",
        "eventDefinitions": [
            {
                "eventDefinitionId": "800313",
                "eventName": "Update an Endpoint Resources Details",
                "eventDescription": "Update an Endpoint Resources Details."
            },
            {
                "eventDefinitionId": "892355",
                "eventName": "Create an Endpoint",
                "eventDescription": "Add a new Endpoint"
            },
            {
                "eventDefinitionId": "913159",
                "eventName": "Delete Endpoint Resource",
                "eventDescription": "Deletes an endpoint resource details."
            }
        ]
    }
]

EventType members

Member Type Description
eventDefinitions EventType.eventDefinitions[] Encapsulates information about an event type definition
eventTypeId String The ID of the event type.
eventTypeName String The name of the event type.
EventType.eventDefinitions[] Encapsulates information about an event type definition
eventDefinitionId String The ID of an event definition.
eventDescription String The description of an event.
eventName String The name of an event.

Errors

This section provides details on the data object that reflects the API’s common response to error cases, and lists the API’s range of response status codes for both error and success cases.

Error Responses

This API responds with JSON objects that adhere to the HTTP Problem Details standard. This example shows an incorrect request error, where details explain why the error occurred and incidentId may be useful if you need to communicate the problem to your Akamai support representative:

{
    "details": [
        {
            "code": "wrong.query.parameters",
            "message": "Both 'afterEventId' and 'beforeEventId' present. Only one out of those two query parameters could be specified for the same request.",
            "data": {
                "beforeEventId": "b1d9b7a7-86ce-4bf9-800e-84be19176557",
                "afterEventId": "b1d9b7a7-86ce-4bf9-800e-84be19176557"
            }
        }
    ],
    "code": "bad.request",
    "title": "Bad Request",
    "incidentId": "0d3361b0-7145-4d45-9adf-7662df2e5185"
}

HTTP Status Codes

This section lists the full range of response codes the API may generate.

Code Description
200 The operation was successful.
400 Bad Request.
401 Authentication failure.
403 Access is forbidden.
404 Resource not found.
405 Method not supported.
500 Internal server error.
503 Too many requests. Service is temporarily unavailable.

Last modified: 3/28/2018