Get metric by id

Prev Next
Get
/inventory/metrics/{metricId}

Returns the metric identified by the given id, with its name, label, description, measurement unit, type and group.
The metric id can be obtained from the list of metrics of a thing-definition.

Security
HTTP
Type bearer
Header parameters
X-Servitly-Tenant
stringRequired

The name of the tenant (e.g. acme).

Path parameters
metricId
stringRequired

The metric identifier.

Minimum1
Exampleabcd1234
Responses
200

Successful operation.

Expand All
object

The object describing a metric.

id
string

The metric object identifier.

name
string

The metric name.

Exampletemp
label
string

The metric label.

ExampleTemperature
description
string

The metric description.

ExampleThe environment temperature measured through....
unit
string

The metric measurement unit.

Example°c
group
string

The name of the group to which the metric belongs.

ExampleSensors
type
string

The metric type.

Valid values[ "SIMPLE", "BLOB", "RECORD", "COUNTER", "DERIVED", "DELTA", "ALGORITHM", "WEAR" ]
valueType
string

The metric value type.

Valid values[ "STRING", "BOOLEAN", "INTEGER", "LONG", "FLOAT", "DOUBLE" ]
mapping
object

The metric mapping (RAW Data metrics only).

path
string

The metric mapping path.

Examplemeasures
name
string

The metric mapping name.

Exampletemp, hum, R50
thingDefinition
object

The thing-definition identifier associated with the metric.

id
string

The referenced object identifier.

Example1234abcd
401

User not authenticated.

object
message
string

The error response.

ExampleUser not authenticated
403

User not authorized.

object
message
string

The error response.

ExampleUser not authorized
404

Resource was not found.

object
message
string

The error response.

ExampleResource not found
429

API call rate limit exceeded.

object
message
string

The error response.

ExampleAPI call rate limit exceeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error