Time Series of API Calls Counts¶
Get Historical Data¶
-
GET
call-counts/historical/
¶ Note
Authorized Roles: root, manager
It returns historical data by organization in a time period. When the amount of data found is greater than 100 points, it will be aggregated into 100 buckets.
- Query Parameters
start_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] Start timestamp
end_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] End timestamp
?start_timestamp=1616962929.0&end_timestamp=1635452529.0
- Response JSON Object
warnings (list-of-string) – Optional. List of warnings
timestamps (list-of-float64) –
Timestamps
[min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)]
counts (list-of-uint64) – Counts array
{ "timestamps": [1616962929.0, 1616963929.0, 1616964929.0, 1635452529.0], "counts": [78, 0, 15, 40] }
Get Historical Data By Label¶
-
GET
call-counts/historical/<str:label>/
¶ Note
Authorized Roles: root, manager
It returns historical data by organization and label in a time period. When the amount of data found is greater than 100 points, it will be aggregated into 100 buckets.
The labels are:
ACCOUNTS
: emails or names, depending on the type of account.ENDPOINTS
: names of endpoint groups and they are defined internally. The names will always be returned based on the samples found in the search.DBS
: db names created or deleted.SCENARIOS
: recommendation type and scenario name.RECO_TYPES
: recommendation type.CHAT
: active chat session per organization.
- Query Parameters
start_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] Start timestamp
end_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] End timestamp
?start_timestamp=1616962929.0&end_timestamp=1635452529.0
- Response JSON Object
warnings (list-of-string) – Optional. List of warnings
timestamps (list-of-float64) –
Timestamps
[min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)]
series (list-of-object) –
Series
Inner fields:
key (string) – Key
description (string) – Description of series
counts (list-of-uint64) – Counts
extra_data (object) – Extra series data
Inner fields:
db_id (string) – Database ID
{ "timestamps": [1616962929.0, 1616963929.0, 1635452529.0], "series": [ { "key": "USERINTERACTION", "description": "create user interactions", "extra_data": {}, "counts": [78, 0, 40] }, { "key": "USERRATING", "description": "create, update, get or delete user ratings", "extra_data": {}, "counts": [2, 45, 3] }, ] }
Get Historical Data By Scenario¶
-
GET
call-counts/historical/SCENARIOS/<str:reco_type>/<str:name>/
¶ Note
Authorized Roles: root, manager, backend
It returns historical data by scenario in a time period. When the amount of data found is greater than 100 points, it will be aggregated into 100 buckets.
- Query Parameters
start_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] Start timestamp
end_timestamp (float64) – Optional. [min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)] End timestamp
?start_timestamp=1616962929.0&end_timestamp=1635452529.0
- Response JSON Object
warnings (list-of-string) – Optional. List of warnings
timestamps (list-of-float64) –
Timestamps
[min: -150000000000.0 (year -2786) max: 3500000000.0 (year 2080)]
counts (list-of-uint64) – Counts array
{ "timestamps": [1616962929.0, 1616963929.0, 1616964929.0, 1635452529.0], "counts": [78, 0, 15, 40] }