UploadDataToBlockchain
Uploads data from a business system to a blockchain. The business system generates a unique identity for the data. The data is then asynchronously uploaded to the blockchain through a queue. You can use this unique identity to query and confirm the data.
Request parameters
Name | Type | Required | Example | Description |
Action | String | Yes | UploadDataToBlockchain | A required parameter. Set the value to UploadDataToBlockchain. |
DataDID | String | Yes | did:lto:000FFFFFEAEDFDF0B4999600610B599D00000001 | The unique identity of the data. |
RouteRuleId | String | Yes | 1234362888407468 | The ID of the routing rule. |
PlainData | String | Yes | "Any data" | The plaintext data value to be uploaded to the blockchain. |
PrivacyData | String | Yes | "Any device data that requires privacy protection" | The private data value to be uploaded to the blockchain. |
Response data
Name | Type | Example | Description |
RequestId | String | F23A53CD-0EA7-48B0-B97C-1E7A7F910234 | The request ID. |
Code | String | 200 | The response code. |
Message | String | Parameter error | The detailed information when the request fails. |
Success | boolean | true | Indicates whether the request was successful. |
Examples
Request example
http(s)://[Endpoint]/?Action=UploadDataToBlockchain
&IotAuthType=ID2
&DataDID=did:lto:000FFFFFEAEDFDF0B4999600611DD31B0000****
&RouteRuleId=8474617438531302
&PlainData=Plaintext data
&PrivacyData=Private data
&<Common request parameters>Successful response example
XML format
<Message>-</Message>
<RequestId>0D80ED7B-FE21-15DF-84D6-95BA0583****</RequestId>
<Data>-</Data>
<Code>00000</Code>
<Success>true</Success>JSON format
{
"Message": "-",
"RequestId": "0D80ED7B-FE21-15DF-84D6-95BA0583****",
"Data": "-",
"Code": "00000",
"Success": "true"
}Error codes
For more information, see Error codes.