View virtual device mirror
- Print
- PDF
View virtual device mirror
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Summary
View virtual device mirror.
Request
Request URL
GET {CLOUD_IOT_CORE_API_URL}/devices/{deviceName}/mirror
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}
Path Variables
Item | Requirement status | Type | Description |
---|---|---|---|
deviceName | Yes | string | Virtual device name |
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
name | No | string | Virtual device mirror name (operate as default mirror when null) |
Request body
{
"clientToken" : "string"
}
Item | Requirement status | Type | Description | Limitations |
---|---|---|---|---|
clientToken | No | string | When clientToken is included in the request, the clientToken gets displayed in the response as is. | Up to 64 bytes |
Response
Response body
{
"metadata": {
"desired" : {
"key" : {
"timstamp" : "long"
}
},
"reported" : {
"key" : {
"timstamp" : "long"
}
}
},
"state": {
"desired": {
"key": "value"
},
"reported": {
"key": "value"
}
},
"clientToken" : "string",
"version": "long",
"timestamp": "long"
}
Item | Type | Description |
---|---|---|
metadata | JSON Object | Object that expresses the time when the key was updated in desired and reported state |
metadata.desired.{keyName}.timestamp | timestamp | Time when the key was updated in desired state |
metadata.reported.{keyName}.timestamp | long | Time when the key was updated in reported state |
state | JSON Object | State of the virtual device mirror |
state.desired | JSONObject | State properties and values requested as desired to the virtual device mirror |
state.reported | JSONObject | State properties and values reported as reported to the virtual device mirror |
clientToken | string | clientToken of the request body |
version | long | Version of the virtual device mirror |
timestamp | long | Time when the virtual device search response was created |
Example
Request body
{
"clientToken": "ABVS111"
}
Response body
{
"metadata": {
"desired": {
"temperature": {
"timestamp": 1631097617
},
"isOn": {
"timestamp": 1631097617
},
"id": {
"timestamp": 1631097617
}
}
},
"clientToken": "ABVS111",
"state": {
"desired": {
"temperature": 33,
"isOn": true,
"id": "abc1"
},
"reported": {
"temperature": 35,
"isOn": false,
"id": "abc1"
}
},
"version": 5,
"timestamp": 1631097617
}
Was this article helpful?