Skip to main content
POST
/
v2
/
commands
/
command-completions
POST /v2/commands/command-completions
curl --request POST \
  --url https://api.example.com/v2/commands/command-completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parties": [
    "<string>"
  ],
  "beginExclusive": 123
}
'
[
  {
    "completionResponse": {
      "Completion": {
        "value": {
          "commandId": "<string>",
          "userId": "<string>",
          "actAs": [
            "<string>"
          ],
          "offset": 123,
          "synchronizerTime": {
            "synchronizerId": "<string>",
            "recordTime": "<string>"
          },
          "status": {
            "code": 123,
            "message": "<string>",
            "details": [
              {
                "typeUrl": "<string>",
                "value": "<string>",
                "unknownFields": {
                  "fields": {}
                },
                "valueDecoded": "<string>"
              }
            ]
          },
          "updateId": "<string>",
          "submissionId": "<string>",
          "deduplicationPeriod": {
            "DeduplicationDuration": {
              "value": {
                "seconds": 123,
                "nanos": 123,
                "unknownFields": {
                  "fields": {}
                }
              }
            }
          },
          "traceContext": {
            "traceparent": "<string>",
            "tracestate": "<string>"
          },
          "paidTrafficCost": 123
        }
      }
    }
  }
]

Authorizations

Authorization
string
header
required

Ledger API standard JWT token

Query Parameters

limit
integer<int64>

maximum number of elements to return, this param is ignored if is bigger than server setting

stream_idle_timeout_ms
integer<int64>

timeout to complete and send result if no new elements are received (for open ended streams)

Body

application/json
parties
string[]

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

beginExclusive
integer<int64>

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

Response

completionResponse
CompletionResponse · object

Required