Batch-create virtual device
    • PDF

    Batch-create virtual device

    • PDF

    Article Summary

    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"
                   }
                ]
             }
          }
       ]
    }
    
    CategoryRequired statusTypeRestrictionsDescription
    devices[].device.nameYesstringLess than 128 characters. Only lower and upper English letters, numbers, -, and _ are allowed.Virtual device name
    devices[].device.descriptionYesstringUp to 128 characters are allowed.
    The characters &, <, >, ", and ' aren't allowed.
    Virtual device description
    devices[].deviceProperties.createUpdateList[].keyYesstringLess 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[].valueNostringLess 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"
                            }
                        ]
                    }
                }
            ]
        }
    }
    
    CategoryTypeDescription
    statusstringIndicates whether response was successful
    body.devices[].device.namestringVirtual device name
    body.devices[].device.descriptionstringVirtual device description
    body.devices[].device.modifyTimelocalDateTimeVirtual device last modified date
    body.devices[].device.registerTimelocalDateTimeVirtual device creation date
    body.devices[].deviceProperties.createUpdateList[].keystringVirtual device property Key
    body.devices[].deviceProperties.createUpdateList[].valuestringVirtual device property Value
    body.devices[].deviceProperties.createUpdateList[].modifyTimelocalDateTimeVirtual device property last modified date
    body.devices[].deviceProperties.createUpdateList[].registerTimelocalDateTimeVirtual 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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.