Search virtual device
    • PDF

    Search virtual device

    • PDF

    Article Summary

    Summary

    Search a list of virtual devices.

    Request

    Request URL

    Search a list of virtual devices whose virtual device name contain keywords.

    GET {CLOUD_IOT_CORE_API_URL}/search/devices/name
    
    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 parameters

    Parameter nameRequired statusTypeRestrictionsDescription
    pageNoIntPage number. Default: 0
    sizeNoIntSize of result list. Default: 10
    keywordYesstringSearch keyword

    Request

    Search a list of virtual devices whose virtual device description contain keywords.

    Request URL

    GET {CLOUD_IOT_CORE_API_URL}/search/devices/description
    
    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 parameters

    Parameter nameRequired statusTypeRestrictionsDescription
    pageNoIntPage number. Default: 0
    sizeNoIntSize of result list. Default: 10
    keywordYesstringSearch keyword

    Request

    Search a list of virtual devices that match the virtual device properties.

    • Search a list of virtual devices that the property key equal to keyword.
    • When the keyword uses a colon ( :), such as key1:value1, search the list of virtual devices that the property key equal to key1, the property value contains in the string value1.
    • If the keyword uses an equal sign (=), such as key1=value1, search the list of virtual devices that the property key equal to key1, ths property value equal to value1.
    • Respond to search results that can use up to three conditions and meet all keyword conditions. Keywords are listed in URLs separated by commas ( , ).

    Request URL

    GET {CLOUD_IOT_CORE_API_URL}/search/devices/property
    
    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 parameters

    Parameter nameRequired statusTypeRestrictionsDescription
    pageNoIntPage number. Default: 0
    sizeNoIntSize of result list. Default: 10
    keywordYeslistNo special characters other than colon (:), equal sign (=), comma (,)Search keyword list (ex) keyword=type=apartment,room:vip

    Response

    Response body

    {
        "status": "string",
        "body": {
            "content": [
                {
                   "device" : {
                        "name": "string",
                        "description": "string",
                        "modifyTime": "localDateTime",
                        "registerTime": "localDateTime"
                    },
                    "deviceProperties" : {
                        "createUpdateList" : [
                            {
                                "key" : "string",
                                "value" : "string",
                                "modifyTime": "localDateTime",
                                "registerTime": "localDateTime"
                            }
                        ]
                    }
                }
            ],
            "page": {
                "size": "long",
                "totalElements": "long",
                "totalPages": "long",
                "number": "long"
            }
        }
    }
    
    CategoryTypeDescription
    statusstringIndicates whether response was successful
    body.content[].device.namestringVirtual device name
    body.content[].device.descriptionstringVirtual device description
    body.content[].device.modifyTimelocalDateTimeVirtual device last modified date
    body.content[].device.registerTimelocalDateTimeVirtual device creation date
    body.content[].deviceProperties.createUpdateList[].keystringVirtual device property key
    body.content[].deviceProperties.createUpdateList[].valuestringVirtual device property value
    body.content[].deviceProperties.createUpdateList[].modifyTimelocalDateTimeVirtual device property last modified date
    body.content[].deviceProperties.createUpdateList[].registerTimelocalDateTimeVirtual device property creation date

    Example

    {
        "status": "SUCCESS",
        "body": {
            "content": [
                {
                    "device" : {
                        "name": "bulb",
                        "description": "small bulb",
                        "modifyTime": "2019-04-24 19:23:14",
                        "registerTime": "2019-04-24 19:23:14"
                    },
                    "deviceProperties" : {
                        "createUpdateList" : [
                            {
                                "key" : "location",
                                "value" : "living_room",
                                "modifyTime": "2019-04-24 19:23:14",
                                "registerTime": "2019-04-24 19:23:14"
                            },
                            {
                                "key" : "price",
                                "value" : "10",
                                "modifyTime": "2019-04-24 19:23:14",
                                "registerTime": "2019-04-24 19:23:14"
                            }
                        ]
                    }
                }
            ],
            "page": {
                "size": 10,
                "totalElements": 1,
                "totalPages": 1,
                "number": 0
            }
        }
    }
    

    Was this article helpful?

    What's Next
    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.