POST /v2/package-vetting
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'http://localhost:7575/v2/package-vetting' \
--header 'Authorization: Bearer $TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}'
import json
import requests
url = "http://localhost:7575/v2/package-vetting"
headers = {'Authorization': 'Bearer <token>', 'Content-Type': 'application/json'}
payload = json.loads(r'''{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('http://localhost:7575/v2/package-vetting', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'http://localhost:7575/v2/package-vetting',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "http://localhost:7575/v2/package-vetting", bytes.NewBufferString(`{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}`))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:7575/v2/package-vetting"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('http://localhost:7575/v2/package-vetting')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer <token>'
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
default
{
"pastVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
},
"newVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
}
}
<string>
{
"code": "<string>",
"cause": "<string>",
"correlationId": "<string>",
"traceId": "<string>",
"context": {},
"resources": [
[
"<string>"
]
],
"errorCategory": 123,
"grpcCodeValue": 123,
"retryInfo": "<string>",
"definiteAnswer": false
}
POST
/
v2
/
package-vetting
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'http://localhost:7575/v2/package-vetting' \
--header 'Authorization: Bearer $TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}'
import json
import requests
url = "http://localhost:7575/v2/package-vetting"
headers = {'Authorization': 'Bearer <token>', 'Content-Type': 'application/json'}
payload = json.loads(r'''{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('http://localhost:7575/v2/package-vetting', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'http://localhost:7575/v2/package-vetting',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "http://localhost:7575/v2/package-vetting", bytes.NewBufferString(`{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}`))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:7575/v2/package-vetting"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('http://localhost:7575/v2/package-vetting')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer <token>'
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
default
{
"pastVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
},
"newVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
}
}
<string>
{
"code": "<string>",
"cause": "<string>",
"correlationId": "<string>",
"traceId": "<string>",
"context": {},
"resources": [
[
"<string>"
]
],
"errorCategory": 123,
"grpcCodeValue": 123,
"retryInfo": "<string>",
"definiteAnswer": false
}
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.
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'http://localhost:7575/v2/package-vetting' \
--header 'Authorization: Bearer $TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}'
import json
import requests
url = "http://localhost:7575/v2/package-vetting"
headers = {'Authorization': 'Bearer <token>', 'Content-Type': 'application/json'}
payload = json.loads(r'''{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('http://localhost:7575/v2/package-vetting', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'http://localhost:7575/v2/package-vetting',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "http://localhost:7575/v2/package-vetting", bytes.NewBufferString(`{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}`))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:7575/v2/package-vetting"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('http://localhost:7575/v2/package-vetting')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer <token>'
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"changes": [
{
"operation": {
"Empty": {}
}
}
],
"dryRun": false,
"synchronizerId": "<string>",
"expectedTopologySerial": {
"serial": {
"Empty": {}
}
},
"updateVettedPackagesForceFlags": [
"UPDATE_VETTED_PACKAGES_FORCE_FLAG_UNSPECIFIED"
]
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
default
{
"pastVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
},
"newVettedPackages": {
"packages": [
{
"packageId": "<string>",
"validFromInclusive": "<string>",
"validUntilExclusive": "<string>",
"packageName": "<string>",
"packageVersion": "<string>"
}
],
"participantId": "<string>",
"synchronizerId": "<string>",
"topologySerial": 123
}
}
<string>
{
"code": "<string>",
"cause": "<string>",
"correlationId": "<string>",
"traceId": "<string>",
"context": {},
"resources": [
[
"<string>"
]
],
"errorCategory": 123,
"grpcCodeValue": 123,
"retryInfo": "<string>",
"definiteAnswer": false
}
Authorizations
httpAuth
Authorization
string
required
HTTP bearer authentication. Send the token as
Authorization: Bearer <token>. Ledger API standard JWT tokenapiKeyAuth
Sec-WebSocket-Protocol
string
required
API key authentication in the header. Ledger API standard JWT token (websocket)
Body
application/json
changes
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-emptyShow child attributes
Show child attributes
operation
object
OpenAPI type:
Operation.RequiredShow child attributes
Show child attributes
Variant 2
object
Show child attributes
Show child attributes
Unvet
object
required
OpenAPI type:
Unvet.Remove packages from the set of vetted packagesShow child attributes
Show child attributes
value
object
required
OpenAPI type:
Unvet1.Remove packages from the set of vetted packagesShow child attributes
Show child attributes
packages
object[]
required
OpenAPI type:
VettedPackagesRef[].Packages to be unvetted. If a reference in this list matches multiple packages, they are all unvetted. Required: must be non-emptyVariant 3
object
Show child attributes
Show child attributes
Vet
object
required
OpenAPI type:
Vet.Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.Show child attributes
Show child attributes
value
object
required
OpenAPI type:
Vet1.Set vetting bounds of a list of packages. Packages that were not previously vetted have their bounds added, previous vetting bounds are overwritten.Show child attributes
Show child attributes
packages
object[]
required
OpenAPI type:
VettedPackagesRef[].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-emptynewValidFromInclusive
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
object
OpenAPI type:
PriorTopologySerial.The serial of last VettedPackages topology transaction on a given participant and synchronizer.Show child attributes
Show child attributes
serial
object
OpenAPI type:
Serial.OptionalShow child attributes
Show child attributes
updateVettedPackagesForceFlags
string[]
Controls whether potentially unsafe vetting updates are allowed. Optional: can be empty
Responses
200
application/json
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.Show child attributes
Show child attributes
packages
VettedPackage[]
required
Sorted by package_name and package_version where known, and package_id as a last resort. Required: must be non-empty
Show child attributes
Show child attributes
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 (int32)
required
Serial of last
VettedPackages topology transaction of this participant and on this synchronizer. RequirednewVettedPackages
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.Show child attributes
Show child attributes
packages
VettedPackage[]
required
Sorted by package_name and package_version where known, and package_id as a last resort. Required: must be non-empty
Show child attributes
Show child attributes
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 (int32)
required
Serial of last
VettedPackages topology transaction of this participant and on this synchronizer. Required400
Invalid value, Invalid value for: bodytext/plain
value
string
required
default
application/json
code
string
required
cause
string
required
correlationId
string
traceId
string
context
Map_String
required
resources
Tuple2_String_String[]
errorCategory
integer (int32)
required
grpcCodeValue
integer (int32)
retryInfo
string
definiteAnswer
boolean
History
Updated
3.5The POST /v2/package-vetting operation changed in this snapshot.
Deprecated
3.4