List Data Points
Returns a paginated collection of data points for a metric. Data points store the actual value of a metric for each time period.
Query parameters
-
ID of a metric or an array of metric IDs
-
Page number
Minimum value is
1
. Default value is1
. -
Number of data points per page (between 1 and 100)
Minimum value is
1
, maximum value is100
. Default value is25
. -
Beginning of date range (ISO 8601 date)
-
End of date range (ISO 8601 date)
-
When set to 'true', excludes data points without a value
Values are
true
orfalse
. Default value isfalse
.
GET
/data_points
curl \
--request GET 'https://api.visible.vc/data_points?metric_id=cad09a10-73e8-4205-ae67-4e6156f37be8' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"meta": {
"page": 1,
"total": 2,
"total_pages": 1
},
"data_points": [
{
"id": "ec5252fe-9abc-4096-85e9-1374e70a3182",
"date": "2021-02-01",
"value": "100.99",
"metric_id": "cad09a10-73e8-4205-ae67-4e6156f37be8"
},
{
"id": "56a1bed4-9ac4-4bd1-8533-077f3ae465c3",
"date": "2021-01-01",
"value": "100000.00",
"metric_id": "cad09a10-73e8-4205-ae67-4e6156f37be8"
}
]
}
Response examples (400)
{
"errors": [
{
"type": "parameter_invalid",
"field": "filter",
"message": "must be an object"
}
]
}
Response examples (401)
{
"errors": [
{
"type": "unauthorized"
}
]
}
Response examples (429)
{
"errors": [
{
"type": "rate_limit_exceeded"
}
]
}