2. Timeseries

2.1. Object Model

A timeseries stores a set of timestamped records, each with a numeric value. Some attributes of a series are generic to all records and drive how the records are manipulated. Timeseries level attributes are:

Record level attributes are:

The timeseries API supports the creation, update and retrieval of this data. It also supports some simple operations on retrieval:

2.2. Operations

2.2.1. List Timeseries

List all the series in the database. The actual list will be filtered to only return series for which the user has read permissions.

2.2.2. Create Timeseries

Create a new timeseries.

2.2.3. Read Timeseries

Read the timeseries level attributes of the given timeseries.

2.2.4. Update Timeseries

Update the timeseries level attributes of the given timeseries.

2.2.5. Delete Timeseries

Delete a timeseries and all associated records.

2.2.6. Create Records

Add records to a timeseries. If records with the same timestamp already exist, they will be replaced by the new records. An exiting record can be deleted by settig its value to null.

2.2.7. Read Records

Read all raw records from a timeseries. This operation may be restricted by the implementation.

2.2.8. Read a Time Slice of Records

Read records between the start and end values, downsample to the given interval and shift by the given timezone.

The start and end parameters form the two parts of a ISO 8601 time interval. Either start or end can be a duration but not both. The interval parameter is a ISO 8601 duration that indicates the sampling interval of the resulting slice. Each of those three parameters can be replaced with a special value of - that indicates:

The path /series/{id}/records/-/-/- should return the same as /series/{id}/records with the same limitations.

The end value can also be the special word now to read all records up to the current timestamp. This value may be different from the end of recording and is not fixed. Two calls to the API with identical parameters may return different results when the now keyword is used.

2.2.9. Stream a Time Slice of Records

Open a websocket stream for that timeseries over which record slices can be requested.