How can we help?

Searching:

0 results found

Devices/GetFullReading

POST /odata/Devices/deviceId/GetFullReading

Description

Gets the last readings from a specific device.

See the following for request and response details ‒

See Also

Request ‒ Devices/GetFullReading

Property Type Description Mandatory
startDate Date The start date of the period for which to obtain data. Y
endDate Date The end date of the period for which to obtain data. Y
keys Strings Device IDs. Y
events List of Events A list of specific events that have been defined in the manifest, in order to retrieve all of them. Y
events /eventType String The event type. See Defining a Device Event Manifest. Axonize provides a list of the event types for your selection, such as 7 for temperature, 8 for humidity, 9 for acceleration, 1001 for pressure and so on.
events /eventName String This property is optional, because the eventType (described above) may be sufficient to retrieve the required information. Because there may be more than one series of each eventType (described above), the eventName property helps uniquely identify each series calculation of a specific eventType that is returned in the response. For example, when a Chart contains multiple Temperature (Event Type 7) calculations.

Example JSON Devices/GetFullReading Request

curl -X POST \

https://api.stg.axonize.com/odata/Devices/5b069de1dc7cde23b0123456/GetFullReading \

-H ‘Content-Type: application/json’ \

-H ‘appId: 2925e8b9-259c-1234-afed-80a20d123456’ \

-H ‘Authorization: Token’ \

-d ‘{“startDate”:”2017-11-18T11:05:37.777Z”,”endDate”:”2018-06-06T11:05:37.777Z”,”events”:[{“name”:”Temperature”,”type”:7}]}’

Response ‒ Devices/GetFullReading

Property Type Description
value Array of Readings Lists the device readings.

Example JSON Devices/GetFullReading Response

Status 200 – OK

{

“@odata.context”: “https://stg-axonizeapi-axonize.stg-ase-axonize.p.azurewebsites.net/odata/$metadata#Collection(Axonize.Common.Models.NonSql.lastReading)”,

“value”: [

{

“type”: 7,

“datetime”: “2018-02-13T13:28:59Z”,

“name”: “Temperature”,

“value”: “3790”,

“cultureInvariantValue”: “3790”,

“unit”: “mV”,

“deviceId”: “5b069de1dc7cde23b0123456”

},

{

“type”: 7,

“datetime”: “2018-02-13T13:28:59Z”,

“name”: “Temperature”,

“value”: “3786”,

“cultureInvariantValue”: “3786”,

“unit”: “mV”,

“deviceId”: “5b069de1dc7cde23b0123456”

}

]

}