ProvisionRequest is a object that represent all information of a provision request for a device.
A provision request is owned by the target account even if the device will connect to the provision broker using a user that belong to the provision account.
A ProvisionRequest object contains a nested ProvisionJob that represent the background job that will be triggered upon device request to be provisioned. The nested ProvisionJob will contain information the provisioning process of a device, its retry counter and general status.
name | data type | constraints | description |
---|---|---|---|
id | number | required | |
accountId | number | required | |
createdOn | number | ||
createdBy | number | required | |
modifiedOn | number | ||
modifiedBy | number | required | |
activatesOn | number | ||
expiresOn | number | ||
status | ProvisionRequestStatus | ||
clientId | string | ||
activationKey | string | ||
provisionUserId | number | required | |
provisionJob | ProvisionJob | ||
optlock | number | required | The optlock field is used to detect that this entity has not been
modified by someone else. When updating an entity, first do a find to
get the latest version of the entity and note the value of the optlock.
Then in the update operation, set the optlock value to match the value
that you found. If someone else has updated the entity between your
find and update operations, the update will fail and the db/server will
return an error.
See this stackoverflow question for more information on optimistic locking. |
provisionSecureURL | boolean | required | |
provisionedCredentialsTight | DeviceCredentialsTight |
Example
{ "id" : 12345, "accountId" : 12345, "createdOn" : 12345, "createdBy" : 12345, "modifiedOn" : 12345, "modifiedBy" : 12345, "activatesOn" : 12345, "expiresOn" : 12345, "status" : "DISABLED", "clientId" : "...", "activationKey" : "...", "provisionUserId" : 12345, "provisionJob" : { "status" : "APPS_INSTALLED", "id" : 12345, "accountId" : 12345, "jobType" : "device_provision_v3", "displayName" : "...", "jobProperties" : "...", "createdOn" : 12345, "createdBy" : 12345, "startOn" : 12345, "retryMaxAttempts" : 12345, "retryCount" : 12345, "optlock" : 12345 }, "optlock" : 12345, "provisionSecureURL" : true, "provisionedCredentialsTight" : "STRICT" }