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

class panko.api.controllers.v2.capabilities.Capabilities(**kw)

A representation of the API and storage capabilities.

Usually constrained by restrictions imposed by the storage driver.

api

A flattened dictionary of API capabilities

event_storage

A flattened dictionary of event storage 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

class panko.api.controllers.v2.events.Event(**kw)

A System event.

event_type

The type of the event

generated

The time the event occurred

message_id

The message ID for the notification

raw

The raw copy of notification

property traits

Event specific properties

class panko.api.controllers.v2.events.Trait(**kw)

A Trait associated with an event.

name

The name of the trait

type

the type of the trait (string, integer, float or datetime)

value

the value of the trait

class panko.api.controllers.v2.events.TraitDescription(**kw)

A description of a trait, with no associated value.

name

the name of the trait

type

the data type, defaults to string

Filtering Queries

class panko.api.controllers.v2.events.EventQuery(**kw)

Query arguments for Event Queries.

field

Name of the field to filter on. Can be either a trait name or field of an event. 1) Use start_timestamp/end_timestamp to filter on generated field. 2) Specify the ‘all_tenants=True’ query parameter to get all events for all projects, this is only allowed by admin users.

type

the type of the trait filter, defaults to string