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

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
schemaNamestringYesName of the schema.

Query parameters

NameTypeRequiredConstraintsDescription
filterstringNoFilters metrics using tag.{key}:"{value}" syntax with each tag delimited by a space (e.g. tag.location:"inside" tag.location:"outside").
namesstringNoComma-separated list of metric names to retrieve (e.g. names=metric_1,metric_2). If not provided, all metrics will be retrieved.
nextTokenstringNoToken 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

PropertyTypeRequiredConstraintsDescription
entriesarray<object>NoMetrics in the schema.
Properties of entries
PropertyTypeRequiredConstraintsDescription
namestringYesread-only (server-generated)Name of the metric.
tagsarray<object>No
Properties of tags
PropertyTypeRequiredConstraintsDescription
keystringYesName of the metric tag.
valuestringNoValue of the metric tag.
nextTokenstringNoToken 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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.