Export policy manifest
Builds a manifest of the governance statements recorded against one or more applied policies in the project, each statement once. Unless includeBlobs is false, it carries the statements' blobs, each policy document, each of the policies' control documents, and the attachments the statements' documents cite; includeContext fills in the manifest's context. The caller needs view_project_data on the project.
https://<host>/gov/v1/policy/manifest/{project_uuid}curl --request POST \
--url 'https://<host>/gov/v1/policy/manifest/{project_uuid}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"includeBlobs":true,"includeContext":true,"policyCids":["string"]}'const response = await fetch("https://<host>/gov/v1/policy/manifest/{project_uuid}", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
})
});
const data = await response.json();interface Manifest {
anchors?: Record<string, unknown>[] | null;
blobs: Record<string, unknown>;
contexts: Record<string, unknown>;
statements: Record<string, unknown>;
version: string;
}
const response = await fetch("https://<host>/gov/v1/policy/manifest/{project_uuid}", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
})
});
if (!response.ok) throw new Error(`${response.status} ${response.statusText}`);
const data: Manifest = await response.json();import requests
response = requests.post(
"https://<host>/gov/v1/policy/manifest/{project_uuid}",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"includeBlobs": True,
"includeContext": True,
"policyCids": [
"string",
],
},
)
response.raise_for_status()
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}`)
req, err := http.NewRequest(http.MethodPost, "https://<host>/gov/v1/policy/manifest/{project_uuid}", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status, string(data))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://<host>/gov/v1/policy/manifest/{project_uuid}"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://<host>/gov/v1/policy/manifest/{project_uuid}");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "<token>");
request.Content = new StringContent("""
{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}
""", Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");<?php
$ch = curl_init('https://<host>/gov/v1/policy/manifest/{project_uuid}');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}
JSON,
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
echo $status . " " . $response . PHP_EOL;require "net/http"
uri = URI("https://<host>/gov/v1/policy/manifest/{project_uuid}")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = <<~'JSON'
{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts "#{response.code} #{response.body}"// Cargo.toml dependencies: reqwest (features "json"), serde_json, tokio (features "full")
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = reqwest::Client::new()
.post("https://<host>/gov/v1/policy/manifest/{project_uuid}")
.header("Authorization", "Bearer <token>")
.json(&json!({
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}))
.send()
.await?;
println!("{} {}", response.status(), response.text().await?);
Ok(())
}Authorizations
BearerAuth· HTTP bearer (JWT)
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
project_uuidrequired | string | Project UUID |
Request bodyrequired
includeBlobsboolean | nullWhether to include blobs in the manifest
includeContextboolean | nullWhether to populate the context field in the manifest
policyCidsstring[]required
{
"includeBlobs": true,
"includeContext": true,
"policyCids": [
"string"
]
}Responses
200Manifest aggregated from one or more applied policies
anchorsAnchor[] | nullOptional anchor records proving statement publication
Show properties
Array of
AnchorlocationsLocation[]requiredStorage locations where the statements are anchored
Show properties
Array of
LocationOne of the following:
integrity_storestringrequired
urlstringrequired
payloadPayloadrequiredDefines what type of data is being anchored
Show Payload
One of the following:
typestring (enum)requiredOne of
Statement
typestring (enum)requiredOne of
StatementId
statementsstring[]requiredList of statement identifiers or full statements being anchored
blobsobjectrequiredBinary blobs referenced by statements, keyed by CID
Show properties
Map of
stringcontextsobjectrequiredJSON-LD context definitions embedded for self-contained processing
Show properties
Map of
anystatementsobjectrequiredStatements included in this manifest, keyed by statement ID
Show properties
Map of
StatementOne of the following:
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
associationstring[]requiredThe associated entities (CID or DID)
registeredBystringrequiredDID of the entity that registered this statement
subjectstringrequiredThe subject of the association (CID or DID)
timestampstringrequiredISO 8601 timestamp of when the statement was created
typeAssociationTyperequiredOne of
certifiesincludesisInstanceOf
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
datastringrequiredCID of the data being stored
operatedBystringrequiredDID of the entity operating the storage system
registeredBystringrequiredDID of the entity that registered this statement
storedOnstringrequiredCID of the storage system description
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
metadatastringrequiredCID of the metadata JSON document
registeredBystringrequiredDID of the entity that registered this statement
subjectstringrequiredThe subject the metadata describes (CID or DID)
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
computationstring | nullOptional CID of the computation definition or code
executedOnstring | nullOptional identifier of the system where computation was executed
inputstringrequiredInput data CIDs (single value or array)
operatedBystringrequiredDID of the entity that operated the computation
outputstringrequiredOutput data CIDs (single value or array)
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
credentialanyrequiredThe W3C Verifiable Credential
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
credentialDsseEnveloperequiredSerializable DSSE envelope for lineage data. Contains a payload and one or more signatures for secure transmission and storage of lineage statements.
Show Envelope
payloadstringrequiredThe base64-encoded payload data
payloadTypestringrequiredThe type/format of the payload
signaturesSignature[]requiredOne or more digital signatures
Show properties
Array of
SignaturekeyidstringrequiredKey identifier used to create the signature
sigstringrequiredThe base64-encoded signature bytes
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
registeredBystringrequiredDID of the entity that registered this statement
sigstoreBundlestringrequiredBase64-encoded Sigstore bundle
subjectstringrequiredThe subject that the bundle is about
timestampstringrequiredISO 8601 timestamp of when the statement was created
One of the following:
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
didstringrequiredThe DID being registered
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
datastringrequiredData artifact CID(s) being registered
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
entitystringrequiredEntity UUID(s) being registered
registeredBystringrequiredDID of the entity that registered this statement
timestampstringrequiredISO 8601 timestamp of when the statement was created
@contextstringrequiredJSON-LD context URL
@idstringrequiredUnique identifier for this statement
@typestringrequiredStatement type identifier
documentstringrequiredCID of the governance document
registeredBystringrequiredDID of the entity that registered this statement
subjectstringrequiredThe subject to which governance applies
timestampstringrequiredISO 8601 timestamp of when the statement was created
versionstringrequiredManifest format version
{
"anchors": [
{
"locations": [
{
"integrity_store": "string"
}
],
"payload": {
"type": "Statement"
},
"statements": [
"string"
]
}
],
"blobs": {
"key": "string"
},
"contexts": {
"key": null
},
"statements": {
"key": {
"@context": "string",
"@id": "string",
"@type": "string",
"association": [
"string"
],
"registeredBy": "string",
"subject": "string",
"timestamp": "string",
"type": "certifies"
}
},
"version": "string"
}400The project UUID does not parse
callstackobjectShow properties
object | nullerrorstringrequired
{
"callstack": {},
"error": "string"
}401Missing or invalid bearer token
callstackobjectShow properties
object | nullerrorstringrequired
{
"callstack": {},
"error": "string"
}403Caller lacks view_project_data on the project
callstackobjectShow properties
object | nullerrorstringrequired
{
"callstack": {},
"error": "string"
}500Internal error, including a policy, control, statement document, or attachment missing from the blob store
callstackobjectShow properties
object | nullerrorstringrequired
{
"callstack": {},
"error": "string"
}503Auth Service or blob storage unavailable
callstackobjectShow properties
object | nullerrorstringrequired
{
"callstack": {},
"error": "string"
}