Get thing metrics last value

Prev Next
Get
/data/lastValue

Retrieves the last value of the given metrics for a thing.
This method returns the timestamp and last value of each specified metric. A maximum of 50 metrics can be requested.

Required permissions: READ_THING.

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

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

Query parameters
thingId
stringRequired

The identifier of the thing for which to retrieve data.

Minimum1.0
Exampleabcd1234
metricName
array of stringRequired

The names of the metrics for which to retrieve the last value.

ExamplemetricName=metric1&metricName=metric2....&metricName=metricN
Responses
200

Successful operation.

Expand All
object
data
Array of object
object
metric
string

The metric name.

Examplestatus
ts
integer (int64)

The timestamp related to the metric last value.

Example1695045244000
value
string
ExampleWORKING
400

Request data not valid.

object
message
string

The error response.

ExampleBad request
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 exeeded.

object
message
string

The error response.

ExampleAPI call rate limit exeeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error