QueryBlockchainData
You can query data recorded on the blockchain using the unique data identity generated by an IoT device.
Request parameters
Name | Type | Required | Example | Description |
Action | String | Yes | QueryBlockchainData | A required parameter. Set the value to QueryBlockchainData. |
BizChainId | String | Yes | a4RNZW10IFCs**** | The business chain identity. |
IotDataDID | String | Yes | did:lto:000FFFFFEAEDFDF0B4999600610B599D0000**** | The unique data identity. |
Response data
Name | Type | Example | Description |
Code | String | 00000 | The response code. |
Data | Struct | entry | The response data. |
PlainData | String | PlainData | The plaintext data. |
PrivacyData | String | VxObZuIVvh68n0fg4GBOZCA5pjtKMsyXWVFTESaLAoHXKGoLGXKuAUgK/PMv**** | The privacy data. |
PrivacyRuleId | String | 2487419232738197 | The privacy rule identity. |
Message | String | - | The detailed information when the request fails. |
RequestId | String | 0D80ED7B-FE21-15DF-84D6-95BA0583**** | The request ID. |
Success | Boolean | true | Indicates whether the request is successful. |
Examples
Sample request
http(s)://[Endpoint]/?Action=QueryBlockchainData &BizChainId=a4RNZW10IFCs**** &IotDataDID=did:lto:000FA0FFEACBFDF0B4999600611A32A90000**** &<Common request parameters>
Sample responses
XML format
<Message>-</Message>
<RequestId>98FA5D6E-FFJI-17E6-9E1C-7FBA80DB****</RequestId>
<Data>
<PrivacyRuleId>2487419232738197</PrivacyRuleId>
<PrivacyData>VxObZuIVvh68n0fg4GBOZCA5pjtKMsyXWVFTESaLAoHXKGoLGXKuAUgK/PMv****</PrivacyData>
<PlainData>PlainData</PlainData>
</Data>
<Code>00000</Code>
<Success>true</Success>JSON format
{
"Message": "-",
"RequestId": "98FA5D6E-FFJI-17E6-9E1C-7FBA80DB****",
"Data": {
"PrivacyRuleId": "2487419232738197",
"PrivacyData": "VxObZuIVvh68n0fg4GBOZCA5pjtKMsyXWVFTESaLAoHXKGoLGXKuAUgK/PMv****",
"PlainData": "PlainData"
},
"Code": "00000",
"Success": "true"
}Error codes
For more information, see Error codes.