Skip to main content

Devices

A Device is a unit in the field, e.g. A smartwatch built by a company and purchased by a customer.

Route Parameters

The Device device_serial should be used whenever referencing a Device in an API or URL.

Request Schema

FieldTypeDescription
device_serial
Required
StringA unique identifier for a Device. Usually a serial number, MAC address, etc.
Example: "ABCD1234"
owner_ref
Required
StringA unique identifier for an Owner of the device. Internal to the client.
Example: "awesome_employee_1234"
hardware_version
Required
StringHardware Version for the Device. Different Hardware Versions will have different Artifacts.
Example: "hwrev1"

Query Parameters

The following parameters can be used to filter Devices.

Query ParameterTypeDescription
releaseString[]Devices reporting these Releases as their last_seen_release
Example: release=1.2.3&release=1.2.4
owner_refString[]Owner UIDs (provided by client) of the Devices
Example: owner_ref=user1234&owner_ref=user5678
last_seen_sinceDateTimeLast Seen timestamp is after this date
Example: "2019-01-19T05:01:13.000000+00:00"
last_seen_untilDateTimeLast Seen timestamp is before this date
Example: "2019-01-19T05:01:13.000000+00:00"
hardware_versionString[]Hardware Versions
Example: "hwrev1"
sortStringSort keys (listed below)
Example: -deployed_date

Sort Parameters

Sort ParameterTypeDescription
last_seenDateTimeDate the Device was last seen

Response Schema

{
"data": {
"id": 1,
"created_date": "2019-01-19T05:01:13.000000+00:00",
"updated_date": "2019-01-19T05:01:13.000000+00:00",
"device_serial": "ABCD1234",
"owner_ref": "awesome_employee_1234",
"hardware_version": "hwrev1",
"last_seen": "2019-01-19T05:01:13.000000+00:00",
"last_seen_release": {
"id": 2,
"version": "1.2.3",
"revision": "11d95ef20f7a048ce1da1a6891dd3e2f92c89d85"
},
"cohort": {
"id": 1,
"name": "Beta Channel",
"slug": "beta"
}
}
}