portability
Create portability exports
Requires scopes: exports:download
POST
/
api
/
portability
/
exports
Create portability exports
curl --request POST \
--url https://evalgate.com/api/portability/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy": {
"classification": "public",
"allowCrossOrganization": true,
"requiredScopes": [
"<string>"
],
"allowedDestinationOrganizationIds": [
"<string>"
],
"requiresSignature": false
},
"selectors": [
{
"id": "<string>",
"kind": "prompt",
"version": "<string>",
"includeHistoricalEvidence": false
}
],
"redactions": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>"
}
],
"signingKeyId": "<string>"
}
'import requests
url = "https://evalgate.com/api/portability/exports"
payload = {
"policy": {
"classification": "public",
"allowCrossOrganization": True,
"requiredScopes": ["<string>"],
"allowedDestinationOrganizationIds": ["<string>"],
"requiresSignature": False
},
"selectors": [
{
"id": "<string>",
"kind": "prompt",
"version": "<string>",
"includeHistoricalEvidence": False
}
],
"redactions": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>"
}
],
"signingKeyId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policy: {
classification: 'public',
allowCrossOrganization: true,
requiredScopes: ['<string>'],
allowedDestinationOrganizationIds: ['<string>'],
requiresSignature: false
},
selectors: [
{
id: '<string>',
kind: 'prompt',
version: '<string>',
includeHistoricalEvidence: false
}
],
redactions: [
{
reason: '<string>',
action: 'remove',
canonicalRef: '<string>',
jsonPointer: '<string>'
}
],
signingKeyId: '<string>'
})
};
fetch('https://evalgate.com/api/portability/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://evalgate.com/api/portability/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'policy' => [
'classification' => 'public',
'allowCrossOrganization' => true,
'requiredScopes' => [
'<string>'
],
'allowedDestinationOrganizationIds' => [
'<string>'
],
'requiresSignature' => false
],
'selectors' => [
[
'id' => '<string>',
'kind' => 'prompt',
'version' => '<string>',
'includeHistoricalEvidence' => false
]
],
'redactions' => [
[
'reason' => '<string>',
'action' => 'remove',
'canonicalRef' => '<string>',
'jsonPointer' => '<string>'
]
],
'signingKeyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://evalgate.com/api/portability/exports"
payload := strings.NewReader("{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://evalgate.com/api/portability/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/portability/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"bundle": {
"schema": "evalgate.portability.bundle",
"createdAt": "<string>",
"assets": [
{
"provenance": {},
"version": "<string>",
"kind": "prompt",
"contentHash": "<string>",
"canonicalRef": "<string>",
"dependencies": [
{
"required": true,
"canonicalRef": "<string>",
"expectedContentHash": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"historicalEvidence": [
true
],
"content": true,
"calibrationInterpretation": {}
}
],
"bundleHash": "<string>",
"bundleVersion": "1.0.0",
"compatibilityVersion": 123,
"bundleId": "<string>",
"sourceOrganization": {
"policy": {
"classification": "public",
"requiredScopes": [
"<string>"
],
"allowCrossOrganization": true,
"allowedDestinationOrganizationIds": [
"<string>"
],
"requiresSignature": true
},
"id": "<string>"
},
"dependencyOrder": [
"<string>"
],
"redactionManifest": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>",
"originalValueHash": "<string>"
}
],
"signature": {
"value": "<string>",
"algorithm": "Ed25519",
"keyId": "<string>",
"publicKey": "<string>"
}
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I
Create portability exports
curl --request POST \
--url https://evalgate.com/api/portability/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy": {
"classification": "public",
"allowCrossOrganization": true,
"requiredScopes": [
"<string>"
],
"allowedDestinationOrganizationIds": [
"<string>"
],
"requiresSignature": false
},
"selectors": [
{
"id": "<string>",
"kind": "prompt",
"version": "<string>",
"includeHistoricalEvidence": false
}
],
"redactions": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>"
}
],
"signingKeyId": "<string>"
}
'import requests
url = "https://evalgate.com/api/portability/exports"
payload = {
"policy": {
"classification": "public",
"allowCrossOrganization": True,
"requiredScopes": ["<string>"],
"allowedDestinationOrganizationIds": ["<string>"],
"requiresSignature": False
},
"selectors": [
{
"id": "<string>",
"kind": "prompt",
"version": "<string>",
"includeHistoricalEvidence": False
}
],
"redactions": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>"
}
],
"signingKeyId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policy: {
classification: 'public',
allowCrossOrganization: true,
requiredScopes: ['<string>'],
allowedDestinationOrganizationIds: ['<string>'],
requiresSignature: false
},
selectors: [
{
id: '<string>',
kind: 'prompt',
version: '<string>',
includeHistoricalEvidence: false
}
],
redactions: [
{
reason: '<string>',
action: 'remove',
canonicalRef: '<string>',
jsonPointer: '<string>'
}
],
signingKeyId: '<string>'
})
};
fetch('https://evalgate.com/api/portability/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://evalgate.com/api/portability/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'policy' => [
'classification' => 'public',
'allowCrossOrganization' => true,
'requiredScopes' => [
'<string>'
],
'allowedDestinationOrganizationIds' => [
'<string>'
],
'requiresSignature' => false
],
'selectors' => [
[
'id' => '<string>',
'kind' => 'prompt',
'version' => '<string>',
'includeHistoricalEvidence' => false
]
],
'redactions' => [
[
'reason' => '<string>',
'action' => 'remove',
'canonicalRef' => '<string>',
'jsonPointer' => '<string>'
]
],
'signingKeyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://evalgate.com/api/portability/exports"
payload := strings.NewReader("{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://evalgate.com/api/portability/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/portability/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy\": {\n \"classification\": \"public\",\n \"allowCrossOrganization\": true,\n \"requiredScopes\": [\n \"<string>\"\n ],\n \"allowedDestinationOrganizationIds\": [\n \"<string>\"\n ],\n \"requiresSignature\": false\n },\n \"selectors\": [\n {\n \"id\": \"<string>\",\n \"kind\": \"prompt\",\n \"version\": \"<string>\",\n \"includeHistoricalEvidence\": false\n }\n ],\n \"redactions\": [\n {\n \"reason\": \"<string>\",\n \"action\": \"remove\",\n \"canonicalRef\": \"<string>\",\n \"jsonPointer\": \"<string>\"\n }\n ],\n \"signingKeyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"bundle": {
"schema": "evalgate.portability.bundle",
"createdAt": "<string>",
"assets": [
{
"provenance": {},
"version": "<string>",
"kind": "prompt",
"contentHash": "<string>",
"canonicalRef": "<string>",
"dependencies": [
{
"required": true,
"canonicalRef": "<string>",
"expectedContentHash": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"historicalEvidence": [
true
],
"content": true,
"calibrationInterpretation": {}
}
],
"bundleHash": "<string>",
"bundleVersion": "1.0.0",
"compatibilityVersion": 123,
"bundleId": "<string>",
"sourceOrganization": {
"policy": {
"classification": "public",
"requiredScopes": [
"<string>"
],
"allowCrossOrganization": true,
"allowedDestinationOrganizationIds": [
"<string>"
],
"requiresSignature": true
},
"id": "<string>"
},
"dependencyOrder": [
"<string>"
],
"redactionManifest": [
{
"reason": "<string>",
"action": "remove",
"canonicalRef": "<string>",
"jsonPointer": "<string>",
"originalValueHash": "<string>"
}
],
"signature": {
"value": "<string>",
"algorithm": "Ed25519",
"keyId": "<string>",
"publicKey": "<string>"
}
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}