QueryBlockchainMetadata

Updated at:

Queries blockchain metadata using the unique data identity that is generated by an IoT device.

Request parameters

Name

Type

Required

Example

Description

Action

String

Yes

QueryBlockchainMetadata

A required parameter. Set the value to QueryBlockchainMetadata.

BizChainId

String

Yes

123436288840****

The ID of the business chain.

IotDataDID

String

Yes

did:lto:000FFFFFEAEDFDF0B4999600610B599D0000****

The unique data identity.

Returned data

Name

Type

Example

Description

Code

String

00000

The response code.

Data

Struct

entry

The response data.

BlockHash

String

c82330c512cb1b3f5932e26e9c00411b28b93efa0fe293aa5d7a39ad793d****

The block hash.

BlockNumber

String

22254

The block height.

IotId

String

000FFFFFEAEDFDA75EC9****

The device name.

MemberName

String

Member01

The member name.

ProductKey

String

a1LdqoS****

The ProductKey of the device.

Timestamp

Long

1624952485495

The time when the data was recorded on the blockchain.

TxHash

String

26baa13efc36b737ae707b5702ec7ac9cb111beca9e2f80b578dbbb3d604****

The transaction hash.

Message

String

-

The details of the error message if the request fails.

RequestId

String

0D80ED7B-FE21-15DF-84D6-95BA0583****

The request ID.

Success

Boolean

true

Indicates whether the request was successful.

Examples

Example request

http(s)://[Endpoint]/?Action=QueryBlockchainMetadata
&BizChainId=123436288840****
&IotDataDID=did:lto:000FFFFFEAEDFDF0B4999600610B599D0000****
&<Common request parameters>

Example responses

XML format

<Message>-</Message>
<RequestId>F23A53CD-0EA7-48B0-B97C-1E7A7F91****</RequestId>
<Data>
    <IotId>000FFFFFEAEDFDA75EC9****</IotId>
    <BlockHash>c82330c512cb1b3f5932e26e9c00411b28b93efa0fe293aa5d7a39ad793d****</BlockHash>
    <TxHash>26baa13efc36b737ae707b5702ec7ac9cb111beca9e2f80b578dbbb3d604****</TxHash>
    <MemberName>Member01</MemberName>
    <BlockNumber>22254</BlockNumber>
    <Timestamp>1624952485495</Timestamp>
    <ProductKey>a1LdqoS****</ProductKey>
</Data>
<Code>00000</Code>
<Success>true</Success>

JSON format

{
  "Message": "-",
  "RequestId": "F23A53CD-0EA7-48B0-B97C-1E7A7F91****",
  "Data": {
    "IotId": "000FFFFFEAEDFDA75EC9****",
    "BlockHash": "c82330c512cb1b3f5932e26e9c00411b28b93efa0fe293aa5d7a39ad793d****",
    "TxHash": "26baa13efc36b737ae707b5702ec7ac9cb111beca9e2f80b578dbbb3d604****",
    "MemberName": "Member01",
    "BlockNumber": "22254",
    "Timestamp": "1624952485495",
    "ProductKey": "a1LdqoS****"
  },
  "Code": "00000",
  "Success": "true"
}

Error codes

For more information about error codes, see Error codes.