In this article
Update Device
You can use this endpoint to update a specific device.
If updateKeys=true, the stored keys are replaced. You must carry out this process with caution because it could potentially take access to the device if
this is set to true, but pass an empty body for device information.
The device primary and secondary keys are auto generated. You must not pass them in the device object.
URL
https://{{HOST}}/security/device?v={version}&deviceId={deviceId}&updateKeys={bool}
Method
PUT
Required IMS Scopes
- securityapi_all
Versions Supported
- 2.0 (Default)
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the api to use | /device?v=2.0 | number |
| deviceId required |
The ID of the device. | /device?deviceId=testDevice | string |
| updateKeys optional |
Defaults to false. Set to true to update both primary and secondary keys |
bool |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | IMS access token |
| Content-Type required |
application/json | Content Type |
Request Body Parameters
| Name | Description | Type |
|---|---|---|
| Object Name required |
Description | object definition |
| Id required |
Description | object definition |
| PrimaryKey required |
Description | object definition |
| SecondaryKey required |
Description | object definition |
| Properties required |
Description | object definition |
| Commands required |
Description | object definition |
| Telemetries required |
Description | object definition |
Example
Request
TODO CURL Request
Response
{
"success": true
}
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| Object Name | Description | object definition |
| success | Description | object definition |