Metrics
Download
Method: Get
Path: /api/v1/metrics/download
Parameters:
- metrics: Single Metric name or string to use with
pattern
. - pattern: With a pattern you can download more than one metric. Pattern uses the text in
metrics
to filter the data. Valid values are:- single: match
metrics
exactly - list: comma separated list each element matching
metrics
exactly from the list of your entitled metrics. - contains: metric name contains
metrics
- starts_with: metric name starts with
metrics
- ends_with: metric name ends with
metrics
- single: match
- start_date: Format YYYY-MM-DD
- end_date: Format YYYY-MM-DD
- max_rows: default is 1000. (More than 10000 might cause a timeout)
- file_format: csv or json
Response
metric_name,timestamp,metric_numeric_value,updated_at
0230523053:throughput,2023-10-03T20:43:52+0000,0.0,2023-10-12T20:43:53+0000
0230523053:throughput,2023-10-03T20:43:52+0000,0.0,2023-10-12T20:43:53+0000
0230523053:throughput,2023-10-03T20:43:52+0000,0.0,2023-10-12T20:43:53+0000
0230523054:throughput,2023-10-03T20:44:07+0000,0.0,2023-10-12T20:44:08+0000
0230523054:throughput,2023-10-03T20:44:07+0000,0.0,2023-10-12T20:44:08+0000
0230523054:throughput,2023-10-03T20:44:07+0000,0.0,2023-10-12T20:44:08+0000
0230523054:throughput,2023-10-03T20:44:07+0000,0.0,2023-10-12T20:44:08+0000
Code Examples
Check here for endpoint address.
metricname / start_date / end_date must be URL encoded if they contain special characters
curl --location '<ENDPOINT>/api/v1/metrics/download?\
start_date=2023-10-01T23%3A00%3A00-04%3A00%3A00&\
end_date=2023-11-01T23%3A00%3A00-04%3A00%3A00&\
format=csv&\
max_rows=1000&\
metrics=0230523053%3Athroughput%2C0230523054%3Athroughput' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR API KEY>'
File Upload
Method: Post
Path: /api/v1/metrics_file_upload
Parameters:
- metric_name: URL encoded metrice name
Payload:
- file: Full path of file to uplaod
Review this page for file format details
Returns: Background Task ID
Review this page to follow a background task
Code Examples
Check here for endpoint address.
JSON Upload
Method: Post
Path: /api/v1/metrics/upload
Payload:
Review this page for date format details{ "metric_name" : "<Metric Name>", "values": [ {"timestamp": "YYYY-MM-DDTHH:MM:SS-0000", "value": <value>}, ] }
Returns: Background Task ID
Review this page to follow a background task
Code Examples
Check here for endpoint address.
curl --location '<ENDPOINT>/api/v1/metrics/upload' \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR API KEY>' \
--data '{
"metric_name": "02024405:throughput",
"values": [
{
"timestamp": "2023-10-01T11:55:53-0400" ,
"value": 1.0
}
]
}'