Update TSDBv2 Metric Tags

PATCH/projects/{projectId}/tsdb/v2/schemas/{schemaName}/metrics/{metricName}

Base URL: https://api.tinkermode.com

Replaces the metric tags of a metric. Empty tags will remove all tags.

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.
metricNamestringYesName of the metric.

Request body

Content type: application/json

A key and optional value pair that can be used to filter metrics.

An array of objects with the following shape:

PropertyTypeRequiredConstraintsDescription
keystringYesName of the metric tag.
valuestringNoValue of the metric tag.

Request example

{
  "tags": [
    {
      "key": "location",
      "value": "basement"
    },
    {
      "key": "unit",
      "value": "kWh"
    }
  ]
}

Responses

204 Successfully updated the metric's tags.