Call DescribeLedgers to obtain the ledger instance list.

Request parameters

Parameter Type Required Example Description
Action String Required DescribeLedgers

The operation that you want to perform. Valid values: DescribeLedgers

NextToken String No xxxx

Specifies the position where the current read starts. If you set this parameter to null, the server starts from the beginning.

MaxResults Integer Optional 10

The maximum amount of data to read. Default value: 10.

Response parameters

Parameter Type Example Description
Ledgers Array

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 ledger creator.

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. The number of milliseconds since January 1, 1970 (00:00 GMT).

ZoneId String cn-hangzhou-h

The zone ID of the ledger instance.

MaxResults Integer 10

The maximum amount of data to read.

NextToken String xxxx

Returns the position where the data is read. Empty indicates that the data has been read.

RequestId String 89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeLedgers
&<Common request parameters>

Sample success responses

XML format

<RequestId>89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C</RequestId>
<NextToken>xxxx</NextToken>
<MaxResults>10</MaxResults>
<Ledgers>
    <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>
    <OwnerAliUid>122435xxxxx</OwnerAliUid>
    <LedgerType>JOURNAL</LedgerType>
    <UpdateTime>1587515659345</UpdateTime>
    <RegionId>cn-hangzhou</RegionId>
    <LedgerStatus>NORMAL</LedgerStatus>
    <LedgerName> Ledger 1</LedgerName>
    <LastTimeAnchor>
        <LedgerDigest>f1e17070c100bd86538550252d94540481f7b81b852c859c906a44e416efdb86</LedgerDigest>
        <JournalId>50</JournalId>
        <LedgerDigestType>SHA256</LedgerDigestType>
        <Proof>{"hashInHex":"aecdd0b65b7c0bd50bac1ac5d3cfa06ed78ce7cb270b3ca1110b2a6549242d49","sequence":52516}</Proof>
        <LedgerVersion>50</LedgerVersion>
        <TimeStamp>1587095881000</TimeStamp>
    </LastTimeAnchor>
</Ledgers>

JSON format

{
    "RequestId": "89E6B5F5-7511-46A7-9EDB-3C6F8AA4D48C",
    "NextToken": "xxxx",
    "MaxResults": 10,
    "Ledgers": {
        "JournalCount": 100,
        "ZoneId": "cn-hangzhou-h",
        "TimeAnchorCount": 10,
        "CreateTime": 1587515659345,
        "MemberCount": 10,
        "LedgerId": "l-c8cc7be3eea542axxxxxxxxxx",
        "LedgerDescription": "This is my first account book. ",
        "OwnerAliUid": "122435xxxxx",
        "LedgerType": "JOURNAL",
        "UpdateTime": 1587515659345,
        "RegionId": "cn-hangzhou",
        "LedgerStatus": "NORMAL",
        "LedgerName": "ledger 1",
        "LastTimeAnchor": {
            "LedgerDigest": "f1e17070c100bd86538550252d94540481f7b81b852c859c906a44e416efdb86",
            "JournalId": 50,
            "LedgerDigestType": "SHA256",
            "Proof": "{\"hashInHex\":\"aecdd0b65b7c0bd50bac1ac5d3cfa06ed78ce7cb270b3ca1110b2a6549242d49\",\"sequence\":52516}",
            "LedgerVersion": 50,
            "TimeStamp": 1587095881000
        }
    }
}

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.
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.