SearchSensorReadings
Returns the readings of a specified sensor, with the most recent reading first. Sensor readings are stored as events; this request an array of events.
Authorization
thingspace_oauth VZ-M2M-Token This is the ThingSpace token, from Credentials and Tokens is used
In: header
M2M Session Token (How to generate an M2M session token?)
In: header
Path Parameters
The name of the sensor.
Request Body
application/json
The device identifier and fields to match in the search.
The device identifier and fields to match in the search.
The ID of the authenticating billing account, in the format {"billingaccountid":"1234567890-12345"}.
The ID of the target to delete, in the format {"id": "dd1682d3-2d80-cefc-f3ee-25154800beff"}.
The maximum number of events to include in the response.
int32The maximum number of events to include in the response.
Response Body
application/json
curl -X POST "https://example.com/cc/v1/devices/fields/string/actions/history" \ -H "Content-Type: application/json" \ -d '{ "accountidentifier": { "billingaccountid": "1223334444-00001" }, "resourceidentifier": { "imei": "864508030084997" }, "$limitnumber": 2 }'{ "SearchSensorHistory": [ { "action": "update", "createdon": "2019-02-22T04:05:26Z", "deviceid": "8461f530-2e31-6e87-e357-6c38251d4d01", "fields": { "temperature": "18.4" }, "id": "4521b7a7-7de1-6e68-f020-1345ef3b764a", "kind": "ts.event", "lastupdated": "2019-02-22T04:05:49.786Z", "state": "update", "tagids": [ "4d110e4f-7a7c-6b26-eaac-31cc34c6e1d4", "cd81ed16-18ae-6c7d-eaba-2883b0395387" ], "transactionid": "864508030084997-OnBoard-c05f946c-3f5c-4527-b4d0-5aca256fc3dd", "version": "1.0", "versionid": "238addb9-3657-11e9-8848-02420a951f13" }, { "action": "update", "createdon": "2019-02-22T03:05:26Z", "deviceid": "8461f530-2e31-6e87-e357-6c38251d4d01", "fields": { "temperature": "19.0" }, "id": "05b1ea7b-4bf2-6af6-ea8b-414595f2c3e9", "kind": "ts.event", "lastupdated": "2019-02-22T03:05:48.483Z", "state": "update", "tagids": [ "4d110e4f-7a7c-6b26-eaac-31cc34c6e1d4", "cd81ed16-18ae-6c7d-eaba-2883b0395387" ], "transactionid": "864508030084997-OnBoard-5f71f47d-4464-4f69-a3ee-5c243f0ef5b8", "version": "1.0", "versionid": "c0ffa4b5-364e-11e9-a3ee-02420a8c0d14" } ]}
