Devices
Activate Device to a Product
POST /api/devices/{device_id}/activate
If a device based on a compatible platform, is unlocked, and the device has access to the appropriate flavor, platform and product product, the device can be activated to become that product. Once activated, the device must perform an OTA to receive the firmware bundle for the new product.
Parameters
propertytype | descriptionexample | device_idid_or_uuid | id or uuid1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | product_idid required | ID of the Product to activate to1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"product_id":"1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1"}' http://localhost:2002/api/devices/{device_id}/activate
Delete Device CloudFS file
DELETE /api/devices/{device_id}/files/{path*}
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X DELETE -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{device_id}/files/{path*}
Get a CloudFS file
GET /api/devices/{device_id}/files/{path*}
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{device_id}/files/{path*}
Index Device CloudFS files
GET /api/devices/{device_id}/files
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{device_id}/files
Upload a CloudFS file
POST /api/devices/{device_id}/files/{path*}
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{device_id}/files/{path*}
Get filtered list of devices
GET /api/devices
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices
Get a Device
GET /api/devices/{identifier}
Parameters
propertytype | descriptionexample | identifierdevice_id_uuid_or_mac_addr | Device_id, UUID, Mac Addr or BT Addr1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{identifier}
Perform OTA on behalf of BLE device.
POST /api/devices/{device_id}/ota
Parameters
propertytype | descriptionexample | device_idid | device_id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | bidid | Optionally indicate currently installed bundle1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
bundle_idid | Request specific bundle. Must be published bundle on product device is activated to.1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"bid":"1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1","bundle_id":"1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1"}' http://localhost:2002/api/devices/{device_id}/ota
Report bundle version BLE Device is running after OTA
POST /api/devices/{device_id}/ota/result
Parameters
propertytype | descriptionexample | device_idid | device_id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | bundle_idid required | id of bundle device successfully OTAd to1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"bundle_id":"1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1"}' http://localhost:2002/api/devices/{device_id}/ota/result
Get Products that Device Owner can activate Device to
GET /api/devices/{id}/products
Parameters
propertytype | descriptionexample | idid_or_uuid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{id}/products
Provision a new Device
POST /api/devices/provision
Payload
propertytype | descriptionexample | uuiddevice_uuid required | Hardware UUID of new device to provision0000000000000000000000000000000000000000 |
platform_idid required | ID of the Platform for the new the Device1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"uuid":"0000000000000000000000000000000000000000","platform_id":"1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1"}' http://localhost:2002/api/devices/provision
Factory Reset claimable device
POST /api/devices/{device_id}/reset
Parameters
propertytype | descriptionexample | device_idid_or_uuid | id or uuid0000000000000000000000000000000000000000 |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/devices/{device_id}/reset
Update a Device
PUT /api/devices/{device_id}
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | titlestring | Title of DeviceMy Device |
descriptionstring | Descriptive of DeviceMy Device |
Curl Example
curl -v -X PUT -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"title":"My Device","description":"My Device"}' http://localhost:2002/api/devices/{device_id}
Set Device Tag
POST /api/devices/{device_id}/tag
Parameters
propertytype | descriptionexample | device_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | tagstring required | Which Bundle Tag the Device should OTA torelease |
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"tag":"release"}' http://localhost:2002/api/devices/{device_id}/tag