Get TSDBv2 Metrics
GET/projects/{projectId}/tsdb/v2/schemas/{schemaName}/metrics
Base URL: https://api.tinkermode.com
Retrieves metrics from a schema, optionally using a filter.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
schemaName | string | Yes | Name of the schema. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
filter | string | No | Filters metrics using tag.{key}:"{value}" syntax with each tag delimited by a
space (e.g. tag.location:"inside" tag.location:"outside").
| |
names | string | No | Comma-separated list of metric names to retrieve (e.g. names=metric_1,metric_2). If not provided, all metrics will be retrieved.
| |
nextToken | string | No | Token for retrieving additional metrics. A non-empty token indicates additional metrics are available and can be used to retrieve the next set of metrics by reissuing the request with this token. An empty token means there are no more metrics to retrieve. |
Responses
200 Successfully retrieved the metrics.
Content type: application/json
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entries | array<object> | No | Metrics in the schema. | ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
nextToken | string | No | Token for additional metrics. A non-empty token indicates additional metrics are available and can be used to retrieve the next set of metrics by reissuing the request with this token. An empty token means there are no more metrics to retrieve. | ||||||||||||||||||||||||||||||||||||
Response example
{
"entries": [
{
"name": "foo_metric",
"tags": [
{
"key": "location",
"value": "inside"
}
],
"type": "float"
},
{
"name": "bar_metric",
"tags": [
{
"key": "location",
"value": "outside"
}
],
"type": "string"
}
],
"nextToken": ""
}401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |