NAV
HTTP

Introduction

Welcome to the LeadPages Kronos API documentation.

This API adheres to the LeadPages HTTP API Standards document.

Endpoints

/timeseries/v1

Ping

/timeseries/v1/ping

http GET http://dockerhost:8011/integration/v1/ping
{
    "_meta": {
        "_version": "0.1.0"
    },
    "_status": {
        "code": 200
    }
}

Request

GET /timeseries/v1/ping

Body
Empty

Response

Body
_meta._version String
_meta Dictionary
Responses
200 OK
Errors
Empty


Dimensions

/timeseries/v1/dimensions

Request

POST /timeseries/v1/dimensions

Body
kind Enum('counter', 'set')
The kind of dimension to increment. Use sets if you're trying to count unique things. Otherwise prefer counters since they are less expensive.
timestamp Integer?
A UNIX timestamp representing the time at which this dimension should be incremented. Defaults to the current UNIX timestamp.
namespace String
The namespace under which the data should be stored. This must be unique per client service so that different services don't trample over each others' data.
value String?
The value to add to the sets represented by this dimension. Required if kind is 'set'.
amount Integer?
The amount to increment the keys represented by this dimension. Required if kind is 'counter'.
path List[Regexp]

Response

Body
Empty
Responses
202 Accepted
Errors
Empty


Delete

/timeseries/v1/dimensions/delete

Delete the totals for a dimension. This operation is meant for supporting the analytics reset functionality in LeadPages and pretty much nothing else as it can lead to master desyncronization.

Request

POST /timeseries/v1/dimensions/delete

Body
path List[Regexp]
The path of the dimension whose totals must be deleted.
kind Enum('counter', 'set')
The kind of dimension to delete.
namespace String

Response

Body
Empty
Responses
204 No Content
409 Conflict
Errors
Empty


Queries

/timeseries/v1/queries

Request

POST /timeseries/v1/queries

Body
kind Enum('counter', 'set')
since Integer
namespace String
granularity Enum('hour', 'day', 'month')
path List[Regexp]
until Integer?

Response

Body
series ValueDictionary[Integer]
The time series data for the requested range.
total Integer
The lifetime total count or value for the requested query.
rangeTotal Integer
The total count or value for the requested range.
Responses
200 OK
Errors
Empty


Diagnostics

/timeseries/v1/diagnostics

Partitions

/timeseries/v1/diagnostics/partitions

Request

POST /timeseries/v1/diagnostics/partitions

Body
path List[Regexp]
kind Enum('counter', 'set')
namespace String

Response

Body
totalKey String
The total key for the given path in the Redis partition.
partitionId Integer
The id of the Redis partition the data for the given path is stored under.
Responses
200 OK
Errors
Empty


Reflows

/timeseries/v1/diagnostics/reflows

Request

POST /timeseries/v1/diagnostics/reflows

Body
leadpage_id String
account_uuid String
dry_run Boolean
account_id String

Response

Body
Empty
Responses
200 OK
Errors
Empty


Batchqueries

/timeseries/v1/batch-queries

Request

POST /timeseries/v1/batch-queries

Body
ranges List[Range]

Response

Body
results List[TimeSeries]
Responses
200 OK
Errors
Empty


Definitions

Range

Range
kind Enum('counter', 'set')
since Integer
namespace String
granularity Enum('hour', 'day', 'month')
path List[Regexp]
until Integer?

TimeSeries

TimeSeries
series ValueDictionary[Integer]
The time series data for the requested range.
total Integer
The lifetime total count or value for the requested query.
rangeTotal Integer
The total count or value for the requested range.