Create virtual device
    • PDF

    Create virtual device

    • PDF

    Article Summary

    Summary

    Creates a virtual device.

    Request

    Request URL

    POST {CLOUD_IOT_CORE_API_URL}/devices
    
    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

    {
    	"device" : {
            "name": "string",
            "description": "string"
        },
    	"deviceProperties":{
    		"createUpdateList" : [
                {
                    "key": "string",
                    "value": "string"
                }
    		]
    	}
    }
    
    CategoryRequired statusTypeRestrictionsDescription
    nameYesstringLess than 128 characters. Only lower and upper English letters, numbers, -, and _ are allowed.Virtual device name
    descriptionYesstringUp to 128 characters are allowed.
    The characters &, <, >, ", and ' aren't allowed.
    Virtual device description
    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.
    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": {
            "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.namestringVirtual device name
    body.descriptionstringVirtual device description
    body.modifyTimelocalDateTimeVirtual device last modified date
    body.registerTimelocalDateTimeVirtual device creation date
    body.deviceProperties.createUpdateList[].keystringVirtual device property Key
    body.deviceProperties.createUpdateList[].valuestringVirtual device property Value
    body.deviceProperties.createUpdateList[].modifyTimelocalDateTimeVirtual device property last modified date
    body.deviceProperties.createUpdateList[].registerTimelocalDateTimeVirtual device property creation date

    Example

    {
        "status": "SUCCESS",
        "body": {
            "device": {
                "name": "bulb",
                "description": "bulb in living room",
                "modifyTime": "2020-09-25 14:15:25",
                "registerTime": "2020-09-25 14:15:25"
            },
            "deviceProperties": {
                "createUpdateList": [
                    {
                        "key": "lux",
                        "value": "2000",
                        "modifyTime": "2020-09-25 14:15:25",
                        "registerTime": "2020-09-25 14:15:25"
                    },
                    {
                        "key": "ampere",
                        "value": "5",
                        "modifyTime": "2020-09-25 14:15:25",
                        "registerTime": "2020-09-25 14:15:25"
                    }
                ]
            }
        }
    }
    

    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.