V2 Web API

Capabilities

The Capabilities API allows you to directly discover which functions from the V2 API functionality, including the selectable aggregate functions, are supported by the currently configured storage driver. A capabilities query returns a flattened dictionary of properties with associated boolean values - a ‘False’ or absent value means that the corresponding feature is not available in the backend.

GET /v2/capabilities

Returns a flattened dictionary of API capabilities.

Capabilities supported by the currently configured storage driver.

Return type

Capabilities

Events and Traits

GET /v2/event_types

Get all event types.

Return type

list(str)

GET /v2/event_types/(event_type)

Unused API, will always return 404.

Parameters
  • event_type (str) – A event type

GET /v2/event_types/(event_type)/traits

Return all trait names for an event type.

Parameters
  • event_type (str) – Event type to filter traits by

Return type

list(TraitDescription)

GET /v2/event_types/(event_type)/traits/(event_type)

Return all instances of a trait for an event type.

Parameters
  • event_type (str) – Event type to filter traits by

  • trait_name (str) – Trait to return values for

Return type

list(Trait)

GET /v2/events

Return all events matching the query filters.

Parameters
  • q (list(EventQuery)) – Filter arguments for which Events to return

  • limit (int) – Maximum number of samples to be returned.

  • sort (list(str)) – A pair of sort key and sort direction combined with “:”

  • marker (str) – The pagination query marker, message id of the last item viewed

Return type

list(Event)

GET /v2/events/(message_id)

Return a single event with the given message id.

Parameters
  • message_id (str) – Message ID of the Event to be returned

Return type

Event

Filtering Queries

See api-queries for how to query the API.