Types

This method allows you to extract event types (use to get event type names from type IDs returned by index)

Method URL
GET /api/v2/events/types.json

Parameters

None

Example Request

/api/v2/events/types.json

Example Response

[
  {
    "id": 1000014,
    "name": "Action Processing Error"
  },
  {
    "id": 153,
    "name": "Blueprint Created"
  },
  ...

Index

This method allows you to extract events from views, or using an ad hoc query.

Method URL
GET /api/v2/events.json

Parameters

Param Type Required Notes
view_name string No* Name of the event view you’d like to extract events from (* either view_name or query must be specified)
query string No* Query you’d like to use to extract events (* either view_name or query must be specified)
date_from date No Start date to retrieve events from
date_to date No End date to retrieve events until
last_event_id integer No When making multiple requests you can ensure you do not retrieve the same event twice by specifying this value (request will only retrieve events with an event ID higher than this value)
helper_variables array No Comma delimited list of helper variables you would like included in the returned data
page integer No Page you would like to extract results from when using pagination (default 1, 1-indexed)
per_page integer No Number of records you would like to extract per request (default is 500)

Helper Variables

Helper variables are variables available for the event that are not stored directly in the event record. You can only use this parameter when retrieving results for a view_name based request.

Example Request

/api/v2/events.json?view_name=Failed%20Scans&helper_variables=node_scan_url&page=1&per_page=250

Example Response

[
  {
    "id": 1,
    "type_id": "53",
    "environment\_id": 2,
    "created\_at": "2017-01-01 08:08:01",
    "variables":  {
                    "job\_id": 1,
                    "node": "LAMP-01",
                    "node\_id": 1,
                    "node\_type": "SV",
                    "scheduled": true,
                    "status": "exception",
                    "scheduled": true,
                    "success": false
                  }
  },
  {
    "id": 2,
    "type_id": "53",
    "environment\_id": 2,
    "created\_at": "2017-01-01 08:08:01",
    "variables":  {
                    "job\_id": 1,
                    "node": "LAMP-02",
                    "node\_id": 2,
                    "node\_type": "SV",
                    "scheduled": true,
                    "status": "exception",
                    "scheduled": true,
                    "success": false
                  }
  }
]
Tags: events