---
title: "POST /v2/package-vetting"
method: POST
path: "/v2/package-vetting"
deprecated: true
---

# POST /v2/package-vetting

`POST /v2/package-vetting`

> **Deprecated.**

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.

## Request body

- UpdateVettedPackagesRequest
  - `changes` VettedPackagesChange[], required — 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
    - `operation` union — Required
      - object
        - `Empty` Empty5, required
      - object
        - `Unvet` Unvet, required — Remove packages from the set of vetted packages
          - `value` Unvet1, required — Remove packages from the set of vetted packages
            - `packages` VettedPackagesRef[], required — Packages to be unvetted. If a reference in this list matches multiple packages, they are all unvetted. Required: must be non-empty
              - …
      - object
        - `Vet` Vet, required — Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.
          - `value` Vet1, required — Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.
            - `packages` VettedPackagesRef[], required — Packages to be vetted. If a reference in this list matches more than one package, the change is considered ambiguous and the entire update request is rejected. In other words, every reference must match exactly one package. Required: must be non-empty
              - …
            - `newValidFromInclusive` string — The time from which these packages should be vetted, prior lower bounds are overwritten. Optional
            - `newValidUntilExclusive` string — The time until which these packages should be vetted, prior upper bounds are overwritten. Optional
  - `dryRun` 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
  - `synchronizerId` 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
  - `expectedTopologySerial` PriorTopologySerial — The serial of last ``VettedPackages`` topology transaction on a given participant and synchronizer.
    - `serial` union — Optional
      - object
        - `Empty` Empty6, required
      - object
        - `NoPrior` NoPrior, required
      - object
        - `Prior` Prior, required
          - `value` integer, required
  - `updateVettedPackagesForceFlags` string[] — Controls whether potentially unsafe vetting updates are allowed. Optional: can be empty

## Response `200`

- UpdateVettedPackagesResponse
  - `pastVettedPackages` VettedPackages — The list of packages vetted on a given participant and synchronizer, modelled after ``VettedPackages`` in `topology.proto <https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206>`_. The list only contains packages that matched a filter in the query that originated it.
    - `packages` VettedPackage[], required — Sorted by package_name and package_version where known, and package_id as a last resort. Required: must be non-empty
      - `packageId` string, required — Package ID of this package Required
      - `validFromInclusive` string — The time from which this package is vetted. Empty if vetting time has no lower bound. Optional
      - `validUntilExclusive` string — The time until which this package is vetted. Empty if vetting time has no upper bound. Optional
      - `packageName` string — Name of this package. Only available if the package has been uploaded to the current participant. Optional
      - `packageVersion` string — Version of this package. Only available if the package has been uploaded to the current participant. Optional
    - `participantId` string, required — Participant on which these packages are vetted. Required
    - `synchronizerId` string, required — Synchronizer on which these packages are vetted. Required
    - `topologySerial` integer, required — Serial of last ``VettedPackages`` topology transaction of this participant and on this synchronizer. Required
  - `newVettedPackages` VettedPackages, required — The list of packages vetted on a given participant and synchronizer, modelled after ``VettedPackages`` in `topology.proto <https://github.com/digital-asset/canton/blob/main/community/base/src/main/protobuf/com/digitalasset/canton/protocol/v30/topology.proto#L206>`_. The list only contains packages that matched a filter in the query that originated it.
    - `packages` VettedPackage[], required — Sorted by package_name and package_version where known, and package_id as a last resort. Required: must be non-empty
      - `packageId` string, required — Package ID of this package Required
      - `validFromInclusive` string — The time from which this package is vetted. Empty if vetting time has no lower bound. Optional
      - `validUntilExclusive` string — The time until which this package is vetted. Empty if vetting time has no upper bound. Optional
      - `packageName` string — Name of this package. Only available if the package has been uploaded to the current participant. Optional
      - `packageVersion` string — Version of this package. Only available if the package has been uploaded to the current participant. Optional
    - `participantId` string, required — Participant on which these packages are vetted. Required
    - `synchronizerId` string, required — Synchronizer on which these packages are vetted. Required
    - `topologySerial` integer, required — Serial of last ``VettedPackages`` topology transaction of this participant and on this synchronizer. Required

## Other responses

- `400` — Invalid value, Invalid value for: body
- `default`

---

[API](https://skmtc.dev/canton/apis/json-ledger-api-http-endpoints.md) · [All operations](https://skmtc.dev/canton/apis/json-ledger-api-http-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/canton/json-ledger-api-http-endpoints/revisions/296292e8b8f1/schema)
