Queries the details of a ledger.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Required | DescribeLedger |
The operation that you want to perform. Value: DescribeLedger |
LedgerId | String | Required | l-c8cc7be3eea542axxxxxxxxxx |
The Ledger instance ID to query. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Ledger | Struct |
Ledger details. |
|
CreateTime | String | 1587515659345 |
The time when the ledger was created. The number of milliseconds since January 1, 1970 (00:00 GMT). |
JournalCount | Long | 100 |
The total number of records in the ledger. |
LastTimeAnchor | Struct |
The latest anchor point information. |
|
JournalId | String | 50 |
The ID of the record where the time anchor point is located. |
LedgerDigest | String | f1e17070c100bd86538550252d94540481f7b81b852c859c906a44e416efdb86 |
Ledger summary. |
LedgerDigestType | String | SHA256 |
Ledger summary type. Value: sha256. |
LedgerVersion | String | 50 |
The version of the ledger. |
Proof | String | {"hashInHex":"aecdd0b65b7c0bd50bac1ac5d3cfa06ed78ce7cb270b3ca1110b2a6549242d49","sequence":52516} |
Time evidence. |
TimeStamp | String | 1587095881000 |
The timestamp when the value was obtained. The number of milliseconds since January 1, 1970 (00:00 GMT). |
LedgerDescription | String | This is my first Ledger. |
Ledger description. |
LedgerId | String | l-c8cc7be3eea542axxxxxxxxxx |
The ID of the ledger instance. |
LedgerName | String | Ledger 1 |
The Ledger name. |
LedgerStatus | String | NORMAL |
The Ledger status. Valid values: INVALID, NORMAL, DELETING, and DELETED. The INVALID status indicates that the account book is still in the initializing status. The NORMAL status indicates that the account book is available. The DELETING status indicates that the account book is in the DELETING status. The DELETED status indicates that the account book has been DELETED. |
LedgerType | String | JOURNAL |
The type of the ledger. Valid values: KV and JOURNAL. An account book of the KV type can only perform data operations related to the KV, while an account book of the JOURNAL type can only perform data operations related to the JOURNAL. |
MemberCount | Long | 10 |
Number of Ledger members. |
OwnerAliUid | String | 122435xxxxx |
The Alibaba Cloud account ID of the creator of the ledger. |
RegionId | String | cn-hangzhou |
The Region where the ledger is located. |
TimeAnchorCount | Long | 10 |
The number of time anchors in the ledger. |
UpdateTime | String | 1587515659345 |
The last update time of the ledger. This function returns the number of milliseconds that have elapsed since 00:00:00 GMT, January 1, 1970. |
ZoneId | String | cn-hangzhou-h |
The zone ID of the ledger instance. |
RequestId | String | 89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeLedger
&LedgerId=l-c8cc7be3eea542axxxxxxxxxx
&<Common request parameters>
Sample success responses
XML
format
<RequestId>89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C</RequestId>
<Ledger>
<JournalCount>100</JournalCount>
<ZoneId>cn-hangzhou-h</ZoneId>
<TimeAnchorCount>10</TimeAnchorCount>
<CreateTime>1587515659345</CreateTime>
<MemberCount>10</MemberCount>
<LedgerId>l-c8cc7be3eea542axxxxxxxxxx</LedgerId>
<LedgerDescription> This is my first account book. </LedgerDescription>
<LastTimeAnchor>
<LedgerDigest>f1e17070c100bd86538550252d94540481f7b81b852c859c906a44e416efdb86</LedgerDigest>
<JournalId>50</JournalId>
<LedgerDigestType>SHA256</LedgerDigestType>
<Proof>{"hashInHex":"aecdd0b65b7c0bd50bac1ac5d3cfa06ed78ce7cb270b3ca1110b2a6549242d49","sequence":52516}</Proof>
<LedgerVersion>50</LedgerVersion>
<TimeStamp>1587095881000</TimeStamp>
</LastTimeAnchor>
<OwnerAliUid>122435xxxxx</OwnerAliUid>
<LedgerType>JOURNAL</LedgerType>
<UpdateTime>1587515659345</UpdateTime>
<RegionId>cn-hangzhou</RegionId>
<LedgerStatus>NORMAL</LedgerStatus>
<LedgerName> Ledger 1</LedgerName>
</Ledger>
JSON
format
{
"RequestId": "89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C",
"Ledger": {
"JournalCount": 100,
"ZoneId": "cn-hangzhou-h",
"TimeAnchorCount": 10,
"CreateTime": 1587515659345,
"MemberCount": 10,
"LedgerId": "l-c8cc7be3eea542axxxxxxxxxx",
"LedgerDescription": "This is my first account book. ",
"LastTimeAnchor": {
"LedgerDigest": "f1e17070c100bd86538550252d94540481f7b81b852c859c906a44e416efdb86",
"JournalId": 50,
"LedgerDigestType": "SHA256",
"Proof": "{\"hashInHex\":\"aecdd0b65b7c0bd50bac1ac5d3cfa06ed78ce7cb270b3ca1110b2a6549242d49\",\"sequence\":52516}",
"LedgerVersion": 50,
"TimeStamp": 1587095881000
},
"OwnerAliUid": "122435xxxxx",
"LedgerType": "JOURNAL",
"UpdateTime": 1587515659345,
"RegionId": "cn-hangzhou",
"LedgerStatus": "NORMAL",
"LedgerName": "ledger 1"
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter | The specified parameter %s is invalid. | The error message returned because the specified parameters are invalid. |
400 | MissingParameter | You must specify the parameter %s. | The error message returned when the client token is not specified. |
404 | ResourceNotFound | The specified resource %s does not exist. | Resource not found |
403 | UnauthorizedOperation | You are not authorized to perform this operation. %s | No operation permissions |
For a list of error codes, visit the API Error Center.