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

# Lists which participant node vetted what packages on which synchronizer

<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">Lists which participant node vetted what packages on which synchronizer</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>

Lists which participant node vetted what packages on which synchronizer. This endpoint (GET /package-vetting) is deprecated and will be removed in a future release. Please use POST /package-vetting/list instead.

## Protocol Details

<dl class="x2mdx-ref-meta-grid">
  <div class="x2mdx-ref-meta-item">
    <dt>Operation ID</dt>
    <dd>getV2Package-vetting</dd>
  </div>

  <div class="x2mdx-ref-meta-item">
    <dt>Authentication</dt>
    <dd>Bearer token</dd>
  </div>

  <div class="x2mdx-ref-meta-item">
    <dt>Published</dt>
    <dd>3.5</dd>
  </div>
</dl>

## Inputs

### Request body

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

<ParamField body="packageMetadataFilter" type="object">
  OpenAPI type: `PackageMetadataFilter`.

  Filter the VettedPackages by package metadata. A PackageMetadataFilter without package\_ids and without package\_name\_prefixes matches any vetted package. Non-empty fields specify candidate values of which at least one must match. If both fields are set, then a candidate is returned if it matches one of the fields.
</ParamField>

<ParamField body="topologyStateFilter" type="object">
  OpenAPI type: `TopologyStateFilter`.

  Filter the vetted packages by the participant and synchronizer that they are hosted on. Empty fields are ignored, such that a `TopologyStateFilter` without participant\_ids and without synchronizer\_ids matches a vetted package hosted on any participant and synchronizer. Non-empty fields specify candidate values of which at least one must match. If both fields are set then at least one candidate value must match from each field.
</ParamField>

<ParamField body="pageToken" type="string">
  Pagination token to determine the specific page to fetch. Using the token guarantees that `VettedPackages` on a subsequent page are all greater (`VettedPackages` are sorted by synchronizer ID then participant ID) than the last `VettedPackages` on a previous page. The server does not store intermediate results between calls chained by a series of page tokens. As a consequence, if new vetted packages are being added and a page is requested twice using the same token, more packages can be returned on the second call. Leave unspecified (i.e. as empty string) to fetch the first page. Optional
</ParamField>

<ParamField body="pageSize" type="number">
  OpenAPI type: `integer (int32)`.

  Maximum number of `VettedPackages` results to return in a single page. If the page\_size is unspecified (i.e. left as 0), the server will decide the number of results to be returned. If the page\_size exceeds the maximum supported by the server, an error will be returned. To obtain the server's maximum consult the PackageService descriptor available in the VersionService. Optional
</ParamField>

## Outputs

### 200

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

<ResponseField name="vettedPackages" type="VettedPackages[]">
  All `VettedPackages` that contain at least one `VettedPackage` matching both a `PackageMetadataFilter` and a `TopologyStateFilter`. Sorted by synchronizer\_id then participant\_id. Optional: can be empty
</ResponseField>

<ResponseField name="nextPageToken" type="string">
  Pagination token to retrieve the next page. Empty string if there are no further results. Optional
</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>
  *
</ResponseField>

### 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>

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

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

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

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

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

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

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

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

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

## 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 GET /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 GET \
    --url 'http://localhost:7575/v2/package-vetting' \
    --header 'Authorization: Bearer $TOKEN' \
    --header 'Content-Type: application/json' \
    --data '{"packageMetadataFilter":{"packageIds":["string"],"packageNamePrefixes":["string"]},"topologyStateFilter":{"participantIds":["string"],"synchronizerIds":["string"]},"pageToken":"string","pageSize":0}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 response theme={null}
  {
    "vettedPackages": [
      {}
    ],
    "nextPageToken": "string"
  }
  ```

  ```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>
