Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/x2mdx/ledger-api/source-artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"version": "3.5",
"canton_version": "3.5.6"
"canton_version": "3.5.7"
}
]
}
1 change: 1 addition & 0 deletions docs-main/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
93 changes: 91 additions & 2 deletions docs-main/openapi/json-ledger-api/openapi.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
41 changes: 39 additions & 2 deletions docs-main/reference/json-api-reference/details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,44 @@ Select an OpenAPI operation from the sidebar for request and response details. T

</div>

<p class="x2mdx-ref-card-summary">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...</p>
<p class="x2mdx-ref-card-summary">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...</p>


<dl class="x2mdx-ref-meta-grid">

<div class="x2mdx-ref-meta-item">
<dt>Operations</dt>
<dd>POST</dd>
</div>

<div class="x2mdx-ref-meta-item">
<dt>Last seen</dt>
<dd>3.5</dd>
</div>

</dl>


</div>



<div class="x2mdx-ref-card x2mdx-ref-card--static">

<div class="x2mdx-ref-card-head">
<h3>/v2/commands/command-completions</h3>

<div class="x2mdx-ref-badges">

<span class="x2mdx-ref-badge x2mdx-ref-badge--protocol">POST</span>

<span class="x2mdx-ref-badge x2mdx-ref-badge--added">Since 3.5</span>

</div>

</div>

<p class="x2mdx-ref-card-summary">POST: Query completions list (blocking call) Subscribe to command completion events. This streaming endpoint provides more flexibility in filtering than the predecessor ``CompletionStream...</p>


<dl class="x2mdx-ref-meta-grid">
Expand Down Expand Up @@ -2175,7 +2212,7 @@ Select an OpenAPI operation from the sidebar for request and response details. T

<div class="x2mdx-ref-badges">

<span class="x2mdx-ref-badge x2mdx-ref-badge--added">Added 4</span>
<span class="x2mdx-ref-badge x2mdx-ref-badge--added">Added 5</span>

<span class="x2mdx-ref-badge x2mdx-ref-badge--changed">Changed 49</span>

Expand Down