Query active contracts list (blocking call)
POST
Query active contracts list (blocking call). Querying active contracts is an expensive operation and if possible should not be repeated often. Consider querying active contracts initially (for a given offset) and then repeatedly call one of
/v2/updates/...endpoints to get subsequent modifications. You can also use websockets to get updates with better performance.
Protocol Details
Inputs
Query parameters
number
OpenAPI type:
integer (int64).maximum number of elements to return, this param is ignored if is bigger than server settingnumber
OpenAPI type:
integer (int64).timeout to complete and send result if no new elements are received (for open ended streams)Request body
application/json
object
OpenAPI type:
TransactionFilter.Provided for backwards compatibility, it will be removed in the Canton version 3.5.0. Used both for filtering create and archive events as well as for filtering transaction trees.boolean
Provided for backwards compatibility, it will be removed in the Canton version 3.5.0. If enabled, values served over the API will contain more information than strictly necessary to interpret the data. In particular, setting the verbose flag to true triggers the ledger to include labels for record fields. Optional, if specified event_format must be unset.
number
required
OpenAPI type:
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. Must be a valid absolute offset (positive integer) or ledger begin offset (zero). If zero, the empty set will be returned. Requiredobject
OpenAPI type:
EventFormat.A format for events which defines both which events should be included and what data should be computed and included for them. Note that some of the filtering behavior depends on the TransactionShape, which is expected to be specified alongside usages of EventFormat.string
Opaque representation of a continuation token defining a position in the active contracts snapshot. The prefix of the active contracts snapshot will be omitted up to and including the element from which the continuation token was read. To reuse the continuation token from a
GetActiveContractsPageResponse: - subsequent request must be executed on the same participant with the same version of canton, - subsequent request must have the same active_at_offset, - subsequent request must have the same event_format - and the participant must not have been pruned after the active_at_offset. If not specified, the whole active contracts snapshot will be returned. Optional: can be emptyOutputs
200
application/json
JsGetActiveContractsResponse[]
required
400
text/plain
string
required
default
application/json
string
required
string
required
string
string
Map_String
required
Tuple2_String_String[]
integer (int32)
required
integer (int32)
string
boolean
History
Changed
3.5The POST /v2/state/active-contracts operation changed in this snapshot.
Introduced
3.4