仮想デバイスの作成
    • PDF

    仮想デバイスの作成

    • PDF

    Article Summary

    概要

    仮想デバイスを作成します。

    リクエスト

    リクエスト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}
    

    リクエストボディー

    {
    	"device" : {
            "name": "string",
            "description": "string"
        },
    	"deviceProperties":{
    		"createUpdateList" : [
                {
                    "key": "string",
                    "value": "string"
                }
    		]
    	}
    }
    
    項目必須の有無タイプ制約事項説明
    nameYesstring128字以内のアルファベットの大文字小文字、数字、-、_のみ許可仮想デバイス名
    descriptionYesstring128文字以内のみ許可
    &、<、>、"、' は非許可
    仮想デバイスの説明
    deviceProperties.createUpdateList[].keyYesstring128字以内のアルファベットの大文字小文字、数字、-、_のみ許可仮想デバイス属性 Key。 同一のキーを探して情報を修正します。 既存の保存されているキーが要求ボディにない場合は削除されます。
    deviceProperties.createUpdateList[].valueNostring512字以内のアルファベットの大文字小文字、数字、-、_のみ許可仮想デバイス属性 Value

    レスポンス

    レスポンスボディ

    {
        "status": "string",
        "body": {
            "device": {
                "name": "string",
                "description": "string",
                "modifyTime": "localDateTime",
                "registerTime": "localDateTime"
            },
            "deviceProperties": {
                "createUpdateList": [
                    {
                        "key": "string",
                        "value": "string",
                        "modifyTime": "localDateTime",
                        "registerTime": "localDateTime"
                    }
                ]
            }
        }
    }
    
    項目タイプ説明
    statusstringレスポンスの成否
    body.namestring仮想デバイス名
    body.descriptionstring仮想デバイス説明
    body.modifyTimelocalDateTime仮想デバイスの最終修正日
    body.registerTimelocalDateTime仮想デバイスの作成日
    body.deviceProperties.createUpdateList[].keystring仮想デバイス属性 Key
    body.deviceProperties.createUpdateList[].valuestring仮想デバイス属性 Value
    body.deviceProperties.createUpdateList[].modifyTimelocalDateTime仮想デバイス属性の最終修正日
    body.deviceProperties.createUpdateList[].registerTimelocalDateTime仮想デバイス属性の作成日

    {
        "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"
                    }
                ]
            }
        }
    }
    

    この記事は役に立ちましたか?

    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.