TrueSight API Documentation
Alarms v1Alarms v2BatchingDashboards
DatasetsEventsExtended Metrics
PluginsRelaysSourcesSynchronize Data


Updates a metric

Request path properties

name Name of the metric

Request body properties

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

description Description of the metric

displayName Short name to use when referring to the metric

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

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

defaultAggregate When graphing (or grouping at the 1 second interval) the aggregate function that makes most sense for this metric. 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.

isDisabled Is this metric disabled

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"