> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-splice-openapi-manual-pages-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Package vetting

<div class="x2mdx-ref-page x2mdx-ref-page--operation x2mdx-ref-page--manual-api" />

<div class="x2mdx-ref-hero">
  <p class="x2mdx-ref-eyebrow">JSON Ledger API</p>

  <h1 class="x2mdx-ref-title">Package vetting</h1>

  <div class="x2mdx-ref-badges">
    <span class="x2mdx-ref-badge x2mdx-ref-badge--protocol">OpenAPI</span>

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

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

Update the vetted packages of this participant This endpoint (POST /package-vetting) is deprecated and will be removed in a future release. Please use POST /package-vetting/update instead.

## Protocol Details

<div class="x2mdx-ref-meta-grid">
  <div class="x2mdx-ref-meta-item">
    <span class="x2mdx-ref-meta-label">Operation ID</span>
    <span class="x2mdx-ref-meta-value">postV2Package-vetting</span>
  </div>

  <div class="x2mdx-ref-meta-item">
    <span class="x2mdx-ref-meta-label">Authentication</span>
    <span class="x2mdx-ref-meta-value">Bearer token</span>
  </div>

  <div class="x2mdx-ref-meta-item">
    <span class="x2mdx-ref-meta-label">Published</span>
    <span class="x2mdx-ref-meta-value">3.5</span>
  </div>
</div>

## Inputs

### Request body

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ParamField body="changes" type="object[]" required>
  OpenAPI type: `VettedPackagesChange[]`.

  Changes to apply to the current vetting state of the participant on the specified synchronizer. The changes are applied in order. Any package not changed will keep their previous vetting state. Required: must be non-empty
</ParamField>

<ParamField body="dryRun" type="boolean">
  If dry\_run is true, then the changes are only prepared, but not applied. If a request would trigger an error when run (e.g. TOPOLOGY\_DEPENDENCIES\_NOT\_VETTED), it will also trigger an error when dry\_run. Use this flag to preview a change before applying it. Defaults to false. Optional
</ParamField>

<ParamField body="synchronizerId" type="string">
  If set, the requested changes will take place on the specified synchronizer. If synchronizer\_id is unset and the participant is only connected to a single synchronizer, that synchronizer will be used by default. If synchronizer\_id is unset and the participant is connected to multiple synchronizers, the request will error out with PACKAGE\_SERVICE\_CANNOT\_AUTODETECT\_SYNCHRONIZER. Optional
</ParamField>

<ParamField body="expectedTopologySerial" type="object">
  OpenAPI type: `PriorTopologySerial`.

  The serial of last `VettedPackages` topology transaction on a given participant and synchronizer.
</ParamField>

<ParamField body="updateVettedPackagesForceFlags" type="string[]">
  Controls whether potentially unsafe vetting updates are allowed. Optional: can be empty
</ParamField>

## Outputs

### 200

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="pastVettedPackages" type="VettedPackages">
  The list of packages vetted on a given participant and synchronizer, modelled after `VettedPackages` in `topology.proto &lt;https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206&gt;`\_. The list only contains packages that matched a filter in the query that originated it.
</ResponseField>

<ResponseField name="newVettedPackages" type="VettedPackages" required>
  The list of packages vetted on a given participant and synchronizer, modelled after `VettedPackages` in `topology.proto &lt;https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206&gt;`\_. The list only contains packages that matched a filter in the query that originated it.
</ResponseField>

### 400

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">text/plain</span>
</div>

<ResponseField name="value" type="string" required />

### default

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="code" type="string" required />

<ResponseField name="cause" type="string" required />

<ResponseField name="correlationId" type="string" />

<ResponseField name="traceId" type="string" />

<ResponseField name="context" type="Map_String" required />

<ResponseField name="resources" type="Tuple2_String_String[]" />

<ResponseField name="errorCategory" type="integer (int32)" required />

<ResponseField name="grpcCodeValue" type="integer (int32)" />

<ResponseField name="retryInfo" type="string" />

<ResponseField name="definiteAnswer" type="boolean" />

## History

<div class="x2mdx-ref-history" aria-label="Reference history">
  <div class="x2mdx-ref-history-event x2mdx-ref-history-event--changed">
    <div class="x2mdx-ref-history-event-head">
      <span class="x2mdx-ref-history-event-label">Changed</span>
      <code class="x2mdx-ref-history-event-version">3.5</code>
    </div>

    <p class="x2mdx-ref-history-event-detail">The POST /v2/package-vetting operation changed in this snapshot.</p>
  </div>

  <div class="x2mdx-ref-history-event x2mdx-ref-history-event--deprecated">
    <div class="x2mdx-ref-history-event-head">
      <span class="x2mdx-ref-history-event-label">Deprecated</span>
      <code class="x2mdx-ref-history-event-version">3.4</code>
    </div>
  </div>

  <div class="x2mdx-ref-history-event x2mdx-ref-history-event--introduced">
    <div class="x2mdx-ref-history-event-head">
      <span class="x2mdx-ref-history-event-label">Introduced</span>
      <code class="x2mdx-ref-history-event-version">3.4</code>
    </div>
  </div>
</div>

<RequestExample>
  ```bash Request theme={null}
  curl --request POST \
    --url 'http://localhost:7575/v2/package-vetting' \
    --header 'Authorization: Bearer $TOKEN' \
    --header 'Content-Type: application/json' \
    --data '{"changes":[{}],"dryRun":false,"synchronizerId":"string","expectedTopologySerial":{"serial":{}},"updateVettedPackagesForceFlags":["UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"]}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 response theme={null}
  {
    "pastVettedPackages": {
      "packages": [
        {}
      ],
      "participantId": "string",
      "synchronizerId": "string",
      "topologySerial": 0
    },
    "newVettedPackages": {
      "packages": [
        {}
      ],
      "participantId": "string",
      "synchronizerId": "string",
      "topologySerial": 0
    }
  }
  ```

  ```json default response theme={null}
  {
    "code": "string",
    "cause": "string",
    "correlationId": "string",
    "traceId": "string",
    "context": {},
    "resources": [
      [
        "string"
      ]
    ],
    "errorCategory": 0,
    "grpcCodeValue": 0,
    "retryInfo": "string",
    "definiteAnswer": false
  }
  ```
</ResponseExample>
