In this article
Create / Register Device
Create / Register Device
- Device primary and secondary keys are auto generated. You must not pass them in the device object.
- When a device is created, org MCA is set as its owner.
URL
https://{{HOST}}/security/device?v={version}&deviceId={deviceId}
Method
POST
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 |
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 |
|---|---|---|
| id required |
The Device Id | string |
| organization optional |
The org the device should be apart of | string |
Example
Request
curl -X POST
'https://{{HOST}}/securityapi/device?v=2.0&deviceid=testDevice'
-H 'Authorization: Bearer {access_token}'
-H 'Content-Type: application/json'
-d '{
"id": "testDevice",
"organization": "testOrganization"
}'
Response
TODO
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| Object Name | Description | object definition |
| success | Description | object definition |