Batch-create virtual device
- Print
- PDF
Batch-create virtual device
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Summary
Batch-creates virtual devices at once.
Request
Request URL
POST {CLOUD_IOT_CORE_API_URL}/devices/bulk
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Request body
{
"devices":[
{
"device":{
"name":"string",
"description":"string"
},
"deviceProperties":{
"createUpdateList":[
{
"key":"string",
"value":"string"
}
]
}
}
]
}
Category | Required status | Type | Restrictions | Description |
---|---|---|---|---|
devices[].device.name | Yes | string | Less than 128 characters. Only lower and upper English letters, numbers, -, and _ are allowed. | Virtual device name |
devices[].device.description | Yes | string | Up to 128 characters are allowed. The characters &, <, >, ", and ' aren't allowed. | Virtual device description |
devices[].deviceProperties.createUpdateList[].key | Yes | string | Less than 128 characters. Only lower and upper English letters, numbers, -, and _ are allowed. | Virtual device property Key. Find the same key and modify the information. If an existing saved key is not in the request body, it will be deleted. |
devices[].deviceProperties.createUpdateList[].value | No | string | Less than 512 characters. 영Only lower and upper English letters, numbers, -, and _ are allowed. | Virtual device property Value |
Response
Response body
{
"status": "string",
"body": {
"devices":[
{
"device":{
"name":"string",
"description":"string",
"modifyTime": "localDateTime",
"registerTime": "localDateTime"
},
"deviceProperties":{
"createUpdateList":[
{
"key":"string",
"value":"string",
"modifyTime": "localDateTime",
"registerTime": "localDateTime"
}
]
}
}
]
}
}
Category | Type | Description |
---|---|---|
status | string | Indicates whether response was successful |
body.devices[].device.name | string | Virtual device name |
body.devices[].device.description | string | Virtual device description |
body.devices[].device.modifyTime | localDateTime | Virtual device last modified date |
body.devices[].device.registerTime | localDateTime | Virtual device creation date |
body.devices[].deviceProperties.createUpdateList[].key | string | Virtual device property Key |
body.devices[].deviceProperties.createUpdateList[].value | string | Virtual device property Value |
body.devices[].deviceProperties.createUpdateList[].modifyTime | localDateTime | Virtual device property last modified date |
body.devices[].deviceProperties.createUpdateList[].registerTime | localDateTime | Virtual device property creation date |
Example
{
"status": "SUCCESS",
"body": {
"devices": [
{
"device": {
"name": "bulb",
"description": "bulb in living room",
"modifyTime": "2022-04-18 14:15:50",
"registerTime": "2022-04-18 14:15:50"
},
"deviceProperties": {
"createUpdateList": [
{
"key": "lux",
"value": "2000",
"modifyTime": "2022-04-18 14:15:51",
"registerTime": "2022-04-18 14:15:51"
},
{
"key": "ampere",
"value": "5",
"modifyTime": "2022-04-18 14:15:51",
"registerTime": "2022-04-18 14:15:51"
}
]
}
}
]
}
}
Was this article helpful?