Search virtual device
- Print
- PDF
Search virtual device
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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 name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
page | No | Int | Page number. Default: 0 | |
size | No | Int | Size of result list. Default: 10 | |
keyword | Yes | string | Search 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 name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
page | No | Int | Page number. Default: 0 | |
size | No | Int | Size of result list. Default: 10 | |
keyword | Yes | string | Search 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 name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
page | No | Int | Page number. Default: 0 | |
size | No | Int | Size of result list. Default: 10 | |
keyword | Yes | list | No 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"
}
}
}
Category | Type | Description |
---|---|---|
status | string | Indicates whether response was successful |
body.content[].device.name | string | Virtual device name |
body.content[].device.description | string | Virtual device description |
body.content[].device.modifyTime | localDateTime | Virtual device last modified date |
body.content[].device.registerTime | localDateTime | Virtual device creation date |
body.content[].deviceProperties.createUpdateList[].key | string | Virtual device property key |
body.content[].deviceProperties.createUpdateList[].value | string | Virtual device property value |
body.content[].deviceProperties.createUpdateList[].modifyTime | localDateTime | Virtual device property last modified date |
body.content[].deviceProperties.createUpdateList[].registerTime | localDateTime | Virtual 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?