diff --git a/config/x2mdx/ledger-api/source-artifacts.json b/config/x2mdx/ledger-api/source-artifacts.json index ad11aedd7..2835e8cf4 100644 --- a/config/x2mdx/ledger-api/source-artifacts.json +++ b/config/x2mdx/ledger-api/source-artifacts.json @@ -11,7 +11,7 @@ }, { "version": "3.5", - "canton_version": "3.5.6" + "canton_version": "3.5.7" } ] } diff --git a/docs-main/docs.json b/docs-main/docs.json index e219a699a..7a30d96cb 100644 --- a/docs-main/docs.json +++ b/docs-main/docs.json @@ -694,6 +694,7 @@ "POST /v2/commands/async/submit", "POST /v2/commands/async/submit-reassignment", "POST /v2/commands/completions", + "POST /v2/commands/command-completions", "POST /v2/events/events-by-contract-id", "GET /v2/version", "POST /v2/dars/validate", diff --git a/docs-main/openapi/json-ledger-api/openapi.yaml b/docs-main/openapi/json-ledger-api/openapi.yaml index 71ecb92a1..d573d7d1b 100644 --- a/docs-main/openapi/json-ledger-api/openapi.yaml +++ b/docs-main/openapi/json-ledger-api/openapi.yaml @@ -1,12 +1,12 @@ openapi: 3.0.3 info: title: JSON Ledger API HTTP endpoints - version: 3.5.6 + version: 3.5.7 description: |- This specification version fixes the API inconsistencies where certain fields marked as required in the spec are in fact optional. If you use code generation tool based on this file, you might need to adjust the existing application code to handle those fields as optional. If you do not want to change your client code, continue using the OpenAPI specification for the latest Canton 3.4 patch release. - MINIMUM_CANTON_VERSION=3.5.6 + MINIMUM_CANTON_VERSION=3.5.7 paths: /v2/commands/submit-and-wait: post: @@ -221,6 +221,7 @@ description: |- Query completions list (blocking call) + Deprecated: please use ``GetCompletions`` instead. Subscribe to command completion events. Notice: This endpoint should be used for small results set. When number of results exceeded node configuration limit (`http-list-max-elements-limit`) @@ -276,6 +277,68 @@ security: - httpAuth: [] - apiKeyAuth: [] + /v2/commands/command-completions: + post: + summary: "POST /v2/commands/command-completions" + description: |- + Query completions list (blocking call) + + Subscribe to command completion events. + This streaming endpoint provides more flexibility in filtering than the predecessor ``CompletionStream``. + Notice: This endpoint should be used for small results set. + When number of results exceeded node configuration limit (`http-list-max-elements-limit`) + there will be an error (`413 Content Too Large`) returned. + Increasing this limit may lead to performance issues and high memory consumption. + Consider using websockets (asyncapi) for better efficiency with larger results. + operationId: postV2CommandsCommand-completions + parameters: + - name: limit + in: query + description: maximum number of elements to return, this param is ignored if + is bigger than server setting + required: false + schema: + type: integer + format: int64 + - name: stream_idle_timeout_ms + in: query + description: timeout to complete and send result if no new elements are received + (for open ended streams) + required: false + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetCompletionsRequest' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CompletionStreamResponse' + '400': + description: 'Invalid value, Invalid value for: body, Invalid value for: + query parameter limit, Invalid value for: query parameter stream_idle_timeout_ms' + content: + text/plain: + schema: + type: string + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/JsCantonError' + security: + - httpAuth: [] + - apiKeyAuth: [] /v2/events/events-by-contract-id: post: summary: "POST /v2/events/events-by-contract-id" @@ -4458,6 +4521,32 @@ Optional: can be empty type: string + GetCompletionsRequest: + title: GetCompletionsRequest + type: object + properties: + parties: + description: |- + If specified, only completions of commands are included, which have at least one of the ``act_as`` parties + in the given set of parties. + Only Ledger API users with CanReadAsAnyParty permission allowed to provide no ``parties``. + Must be a valid PartyIdString (as described in ``value.proto``). + + Optional: can be empty + type: array + items: + type: string + beginExclusive: + description: |- + This optional field indicates the minimum offset for completions. This can be used to resume an earlier completion stream. + If not set the ledger uses the ledger begin offset instead. + If specified, it must be a valid absolute offset (positive integer) or zero (ledger begin offset). + If the ledger has been pruned, this parameter must be specified and greater than the pruning offset. (the pruning + offset is accessible on the StateService.GetLatestPrunedOffsets endpoint) + + Optional + type: integer + format: int64 GetConnectedSynchronizersResponse: title: GetConnectedSynchronizersResponse type: object diff --git a/docs-main/reference/json-api-reference/details.mdx b/docs-main/reference/json-api-reference/details.mdx index 57c6fd88a..3dd09e540 100644 --- a/docs-main/reference/json-api-reference/details.mdx +++ b/docs-main/reference/json-api-reference/details.mdx @@ -308,7 +308,44 @@ Select an OpenAPI operation from the sidebar for request and response details. T -

POST: Query completions list (blocking call) Subscribe to command completion events. Notice: This endpoint should be used for small results set. When number of results exceeded node confi...

+

POST: Query completions list (blocking call) Deprecated: please use ``GetCompletions`` instead. Subscribe to command completion events. Notice: This endpoint should be used for small resu...

+ + +
+ +
+
Operations
+
POST
+
+ +
+
Last seen
+
3.5
+
+ +
+ + + + + + +
+ +
+

/v2/commands/command-completions

+ +
+ + POST + + Since 3.5 + +
+ +
+ +

POST: Query completions list (blocking call) Subscribe to command completion events. This streaming endpoint provides more flexibility in filtering than the predecessor ``CompletionStream...

@@ -2175,7 +2212,7 @@ Select an OpenAPI operation from the sidebar for request and response details. T
- Added 4 + Added 5 Changed 49