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

GET /v2/state/active

GET
/
v2
/
state
/
active-contracts-page
Try it
GET /v2/state/active-contracts-page

cURL

curl --request GET \
  --url https://api.example.com/v2/state/active-contracts-page \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "eventFormat": {
    "filtersByParty": {},
    "filtersForAnyParty": {
      "cumulative": [
        {
          "identifierFilter": {
            "Empty": {}
          }
        }
      ]
    },
    "verbose": true
  },
  "activeAtOffset": 123,
  "maxPageSize": 123,
  "pageToken": "<string>"
}
'
200
400
default
{
  "activeContracts": [
    {
      "workflowId": "<string>",
      "contractEntry": {
        "JsActiveContract": {
          "createdEvent": {
            "offset": 123,
            "nodeId": 123,
            "contractId": "<string>",
            "templateId": "<string>",
            "createArgument": "<unknown>",
            "witnessParties": [
              "<string>"
            ],
            "signatories": [
              "<string>"
            ],
            "createdAt": "<string>",
            "packageName": "<string>",
            "representativePackageId": "<string>",
            "acsDelta": true,
            "contractKey": "<unknown>",
            "contractKeyHash": "<string>",
            "createdEventBlob": "<string>",
            "interfaceViews": [
              {
                "interfaceId": "<string>",
                "viewStatus": {
                  "code": 123,
                  "message": "<string>",
                  "details": [
                    {
                      "typeUrl": "<string>",
                      "value": "<string>",
                      "unknownFields": {
                        "fields": {}
                      },
                      "valueDecoded": "<string>"
                    }
                  ]
                },
                "viewValue": "<unknown>",
                "implementationPackageId": "<string>"
              }
            ],
            "observers": [
              "<string>"
            ]
          },
          "synchronizerId": "<string>",
          "reassignmentCounter": 123
        }
      },
      "streamContinuationToken": "<string>"
    }
  ],
  "activeAtOffset": 123,
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Ledger API standard JWT token

Body

application/json
eventFormat
EventFormat · object
required

Format of the contract_entries in the result. In case of CreatedEvent the presentation will be of TRANSACTION_SHAPE_ACS_DELTA.

Required

Show child attributes

activeAtOffset
integer<int64>

The offset at which the snapshot of the active contracts will be computed. Must be no greater than the current ledger end offset. Must be greater than or equal to the last pruning offset. Optional, if defined, it must be a valid absolute offset (positive integer) or ledger begin offset (zero). If zero, the empty set will be returned. If not defined, the current ledger end will be used and it will be populated in the response.

Optional

maxPageSize
integer<int32>

The result page will contain at most max_page_size entries of the respective active contract snapshot. The server might reject max_page_size breaching the server-specified limit. Optional, if not defined, the default will be determined by the server.

Optional

pageToken
string

To get the next page of the active contracts snapshot, the page_token should be set to the next_page_token of the last GetActiveContractsPageResponse. The page token only works if subsequent requests:

  • are executed on the same participant,
  • use the same active_at_offset and event_format,
  • and the participant's store was not pruned to after the active_at_offset.

If not specified, the first page of the active contracts snapshot will be returned.

Optional: can be empty

Response

200
application/json
activeContracts
JsGetActiveContractsResponse · object[]
required

The collection of active contracts for this page response.

Required: must be non-empty

Show child attributes

activeAtOffset
integer<int64>
required

The active_at_offset which was specified in the request, or the calculated active_at_offset from the actual ledger end from at the evaluation of the request.

Required

nextPageToken
string

If not present this is the last page. If present, this token must be used to get the next page.

Optional: can be empty