Metric view
Metric views provide time series data from ingested metrics suitable for inclusion in rendered charts. A single view may contain multiple related series.
Part of the API reference collection
This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.
Get metric view
Get a metric view.
GET /metric-views/{name}
Request
Path parameters
name
: Identifying name of the metric view.
Query parameters
Name | Required | Type | Description |
---|---|---|---|
cluster_id | ✔ | string | |
end | string | ||
period | enum string | Enum | |
resolution_multiplier | enum integer | Enum | |
start | string |
cURL example
curl -X GET https://api.crunchybridge.com/metric-views/{name}
-H "Authorization: Bearer $CRUNCHY_API_KEY"
Response
Status: 200
Response containing a metric view.
Content type: application/json
Name | Nullable | Type | Description |
---|---|---|---|
name | enum string | Identifying name of the metric view. Enum | |
series | array of array | Time series data included in this view. Views may have one or more series depending on the view. Each series has a name a number of associated data points. If there are multiple series, they'll always have the same number of data points at the same timestamps. |
Example
{
"name": "postgres-connections",
"series": [
{
"is_empty": false,
"max": null,
"min": null,
"name": "postgres-connections",
"points": [
{
"time": "2021-07-11T01:02:03Z",
"value": 100
},
{
"time": "2021-07-11T01:04:03Z",
"value": 105
},
{
"time": "2021-07-11T01:05:03Z",
"value": 110
},
{
"time": "2021-07-11T01:06:03Z",
"value": 115
},
{
"time": "2021-07-11T01:07:03Z",
"value": 120
}
],
"title": "Number of connected Postgres clients",
"unit": null
}
]
}