Skip to content

Device

Device Management API.

When devices are initialized with the Ioto agent, they will register with the Builder service using their device ID (ClaimID) at https://admin.embedthis.com/api. The device registration API is part of the Builder API. See Device Registration.

Once registered, the device then remains under the management of the Builder until it is "claimed" by a user for management using the "Device Claim" API. When claimed, the device is redirected to the device cloud when it next invokes the "register" API.

Claim

Claim a device for management by a device cloud.

Once a device has registered itself with the builder, a user can claim the device for management.
The claim ID would typically be printed on the device label during manufacturer.

A claim request may specify the device as a test device where it will not be counted towards the subscription device count.

Endpoint

HTTP
POST /device/claim

Authorized User Role

claimDevice

Request Body

FieldTypeRequiredNotes
idstringyesDevice claim ID.

Response

The claimed device.

FieldTypeNotes
accesseddateWhen the device was last accessed.
accountIdstringOwning manager account ID.
createddateWhen the device was first claimed.
idstringDevice Claim ID.
productstringBuilder Product name.
productIdstringBuilder Product ID.
testbooleanDevice is for test purposes.
versionstringFirmware version.
checkedstringChecked version.

Find

Find matching devices filtered by matching properties.

Endpoint

HTTP
POST /device/find

Authorized User Role

user

Request Body

FieldTypeRoleNotes
idstringDevice Claim ID.
accountIdstringownerApp account ID. Required if using CloudAPI token.
productIdstringProduct registration ID from the Builder product list.

Query String Options

FieldTypeDefaultRoleNotes
indexstringownerDatabase index name: primary or gs1.
limitnumberNumber of items to retrieve.
nextobjectPagination token for the next page.
prevobjectPagination token for the previous page.

Response

Paged response.

FieldTypeNotes
dataarrayAn array of devices owned by the user.
nextstringPaged cursor to use for the next page of items.
prevstringPages cursor to use for the previous page of items.

Device

FieldTypeNotes
accesseddateWhen the device was last accessed.
accountIdstringOwning manager account ID.
createddateWhen the device was first claimed.
idstringDevice Claim ID.
productstringBuilder Product name.
productIdstringBuilder Product ID.
testbooleanDevice is for test purposes.
versionstringFirmware version.
checkedstringChecked version.

Get

The Get API will fetch a device by its ID. If you have the "owner" role, you can fetch the device for any account by providing an account ID. Otherwise, it will fetch the device for the authenticated account.

Endpoint

HTTP
POST /device/get

Authorized User Role

user

Request Body

FieldTypeRequiredRoleNotes
idstringyesDevice Claim ID.
accountIdstringownerApp account ID.

Response

Device Record.

FieldTypeNotes
accesseddateWhen the device was last accessed.
accountIdstringOwning manager account ID.
createddateWhen the device was first claimed.
idstringDevice Claim ID.
productstringBuilder Product name.
productIdstringBuilder Product ID.
testbooleanDevice is for test purposes.
versionstringFirmware version.
checkedstringChecked version.

GetCreds

Get IAM credentials.

Get credentials for use in the device that is hosted in a dedicated cloud.

This will create temprorary IAM credentials based on the configured Cloud.deviceRole (default IotoDeviceRole). These credentials can be used with appropriate AWS SDK or Ioto AWS Sigv4 APIs.

Endpoint

HTTP
POST /device/getCreds

Authorized User Role

device

Response

A set of AWS IAM credentials that can be used with AWS APIs.

FieldTypeNotes
accessKeyIdstringAWS access key ID.
secretAccessKeystringAWS secret access key.
sessionTokenstringAWS credentials session token.
expiresdateWhen the credentials expire.
regionstringAWS region.

GetSignedUrl

Get a signed URL to upload or download a file for the device.

Endpoint

HTTP
POST /device/getSignedUrl

Authorized User Role

device

Request Body

FieldTypeNotes
idstringDevice claim ID.
commandstringFile command to execute (get/put/delete).
filenamestringFile name.
mimeTypestringMIME type.
sizenumberFile size in bytes.

Response

A signed URL string.

Provision

Provision a device with MQTT certificates.

After a device has been claimed for management by a user into a device cloud, the device can call "getCerts" to request provisioning of MQTT certificates to secure communications.

This call returns the certificate, private key and communications endpoint to use for secure MQTT communications with the device cloud.

Endpoint

HTTP
POST /device/provision

Authorized User Role

device

Request Body

FieldTypeRequiredNotes
idstringyesDevice claim ID.

Response

MQTT certificate and endpoints for device communications.

FieldTypeNotes
accountIdstringApp Account ID.
certificatestringX.509 certificate.
endpointstringMQTT host endpoint for communciations.
idstringDevice ID.
keystringX.509 certificate key.
portnumberMQTT TCP/IP port number.
thingstringAWS IoT Core thing name for the device.
errorstring
delaynumberDelay in seconds until the device block will be lifted.

Release

Release a device from management by a device cloud. Releasing a device returns it to the builder to be available for claiming by another cloud.

Endpoint

HTTP
POST /device/release

Authorized User Role

releaseDevice

Request Body

FieldTypeRequiredNotes
idstringyesDevice claim ID.

Response

Device Record.

FieldTypeNotes
accesseddateWhen the device was last accessed.
accountIdstringOwning manager account ID.
createddateWhen the device was first claimed.
idstringDevice Claim ID.
productstringBuilder Product name.
productIdstringBuilder Product ID.
testbooleanDevice is for test purposes.
versionstringFirmware version.
checkedstringChecked version.