Skip to content
Documentation/canton-network-docs/Ledger APIOpenAPIView on canton-network-docs
canton-network-docs/Ledger APIOpenAPI

POST /v2/updates/get

POST
/
v2
/
updates
/
get-updates-page
Try it
POST /v2/updates/get-updates-page

cURL

curl --request POST \
  --url https://api.example.com/v2/updates/get-updates-page \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "updateFormat": {
    "includeReassignments": {
      "filtersByParty": {},
      "filtersForAnyParty": {
        "cumulative": [
          {
            "identifierFilter": {
              "Empty": {}
            }
          }
        ]
      },
      "verbose": true
    },
    "includeTopologyEvents": {
      "includeParticipantAuthorizationEvents": {
        "parties": [
          "<string>"
        ]
      }
    }
  },
  "beginOffsetExclusive": 123,
  "endOffsetInclusive": 123,
  "maxPageSize": 123,
  "descendingOrder": true,
  "pageToken": "<string>"
}
'
200
400
default
{
  "lowestPageOffsetExclusive": 123,
  "highestPageOffsetInclusive": 123,
  "updates": [
    {
      "update": {
        "OffsetCheckpoint": {
          "value": {
            "offset": 123,
            "synchronizerTimes": [
              {
                "synchronizerId": "<string>",
                "recordTime": "<string>"
              }
            ]
          }
        }
      }
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Ledger API standard JWT token

Body

application/json
updateFormat
UpdateFormat · object
required

Required

Show child attributes

beginOffsetExclusive
integer<int64>

Exclusive lower bound offset of the requested ledger section (non-negative integer). The response page will only contain updates whose offset is strictly greater than this. If set to zero or not defined, the lower bound is set to the actual pruning offset or to the beginning of the ledger if the participant was not pruned yet. If set to positive and the ledger has been pruned, this parameter must be greater or equal than the pruning offset.

Optional

endOffsetInclusive
integer<int64>

Inclusive upper bound offset of the requested ledger section. If specified the response will only contain updates whose offset is less than or equal to this. If not specified response will only contain updates whose offset is less than the current ledger-end.

Optional

maxPageSize
integer<int32>

The result page will contain the first max_page_size Updates of all matching updates. The server may reject queries with max_page_size above server specified limits. If not specified, the default max_page_size is determined by the server.

Optional

descendingOrder
boolean

If set, the page will populate the elements in descending order starting from the end_offset_inclusive.

Optional

pageToken
string

To get the next page of updates, the page_token should be set to the next_page_token of the last GetUpdatesPageResponse. To achieve correct paging: subsequent requests must

  • be executed on the same participant,
  • have the same begin_offset_exclusive,
  • have the same end_offset_inclusive,
  • have the same update_format and
  • have the same descending_order.

If not specified, the first page of updates will be returned.

Optional: can be empty

Response

200
application/json
lowestPageOffsetExclusive
integer<int64>
required

Represents the lower bound of this page.

Required

highestPageOffsetInclusive
integer<int64>
required

Represents the upper bound of the page.

Required

updates
JsGetUpdateResponse · object[]

The first max_page_size updates that match the filter in the request. In case descending_order was selected, the order of the updates is in reversed offset order.

Optional: can be empty

Show child attributes

nextPageToken
string

If the value is not populated, this is the last page. If the value is populated, this token can be used to get the next page. If the original GetFirstUpdatePageRequest end_offset_inclusive was not specified and the request uses ascending order, then this token will always be populated, so you can use it to "tail" the ledger by repeatedly polling with the new page token returned.

Optional: can be empty