TrueSight API Documentation
Alarms v1Alarms v2BatchingDashboards
DatasetsEventsExtended Metrics
PluginsRelaysSourcesSource-TagsSynchronize Data


Updates a metric

Request path properties

name Name of the metric (required)

Request body properties

type Type of metric, could be a device metric, a plugin metric or any arbitrary type (required)

description Description of the metric (optional)

displayName Short name to use when referring to the metric (required)

displayNameShort Terse short name when referring to the metric and space is limited, less than 15 characters preferred. (required)

unit The units of measurement for the metric, can be percent, number, bytecount, or duration (required)

unitDescription An optional description of the unit like "$ per second" or "meters per second". Can only be set for metrics with unit of number. (optional)

defaultAggregate When graphing (or grouping at the 1 second interval) the aggregate function that makes most sense for this metric. (required) Can be sum, avg, max, or min.

defaultResolutionMS Expected polling time of data in milliseconds. Used to improve rendering of graphs for non-one-second polled metrics. (optional)

isDisabled Is this metric disabled (optional)

Example request

curl \
-X PUT \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
   "description": "A cool metric I created",
   "displayName": "My cool metric",
   "displayNameShort": "cool metric",
   "unit": "number",
   "defaultAggregate": "avg"