Skip to main content

List property time intervals

Request

Returns a list of values and the time intervals for which they were in effect for a device.

Use the query parameter to filter property history on custom property key/value criteria. Syntax:

  • key:value: matches rows where the property key is key and the value equals value; use double quotes if the value contains spaces or special characters
  • key:value1,value2: matches rows where the property key is key and the value is either value1 or value2
  • key:*: matches rows where the property key is key and any value
  • *:value: matches rows where any key has the value value
  • foo: matches rows where any key or stringified value contains foo Multiple qualifiers can be used in the same query string; this will filter rows matching the intersection of the qualifiers (AND).
Security
ApiKey(Required scopes: devices.list)
Path
nameOrIdstringrequired

Device name or ID. Device names must be URI-encoded if they contain non-URI-safe characters. If a device is named with another device's ID, the device with the matching name will be returned.

Query
projectIdstring

The project ID that the device belongs to. Required for multi-project orgs.

querystring

Space-separated query string for device property history. Each custom property key must be valid. See above for syntax and examples.

startstring, (date-time)

Properties active on or after this time will be included.

endstring, (date-time)

Properties active before this time will be included.

sortBystring

Field to sort items by ("id", "key", "start", "end")

Enum:"id""key""start""end"
sortOrderstring

Sort order for the sortBy field

Enum:"asc""desc"
offsetinteger, >= 0

Number of items to skip before returning the results

Default:0
limitnumber, [ 0 .. 2000 ]

Maximum number of items to return

Default:2000
Payload
// No request payload

Responses

Property time intervals

Bodyapplication/json
Array [
idstringrequired

ID of the property time interval.

deviceIdstringrequired

ID of the associated device.

keystringrequired

Key of the property.

valuestring or number or boolean or Array of stringsrequired
One of:

Value of the property.

string
startstring, (date-time)required

Inclusive start time this value was in effect.

endstring, (date-time)

Exclusive end time this value was in effect. When absent the value is still in effect.

]
Response
[ { "id": "string", "deviceId": "string", "key": "string", "value": "string", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z" } ]