Policy v2 (experimental)
Replay a recorded policy version 2 decision from its evidence
Re-runs the recorded decision and reports whether it reproduces.
GET
/
v2
/
evidence
/
{recordId}
/
replay
cURL
# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Replay a recorded decision
curl "https://parmana-api-real.vercel.app/v2/evidence/record-123/replay" \
-H "Authorization: Bearer $PARMANA_API_KEY"// EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
// Replay a recorded decision
const response = await fetch(
"https://parmana-api-real.vercel.app/v2/evidence/record-123/replay",
{
method: "GET",
headers: { Authorization: `Bearer ${process.env.PARMANA_API_KEY}` },
},
);
console.log(response.status, await response.text());# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Replay a recorded decision
import os
import urllib.request
def main() -> None:
request = urllib.request.Request(
"https://parmana-api-real.vercel.app/v2/evidence/record-123/replay",
data=None,
method="GET",
headers={
"Authorization": "Bearer " + os.environ.get("PARMANA_API_KEY", ""),
},
)
with urllib.request.urlopen(request) as response:
print(response.status, response.read().decode("utf-8"))
if __name__ == "__main__":
main()const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay', 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://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"reproduced": true,
"differences": [],
"replayed": {
"outcome": "APPROVE"
}
}Authorizations
Caller API key issued by scripts/generate-api-key.ts. Sent as Authorization: Bearer . Verified against a stored SHA-256 hash in constant time by packages/api/src/auth/StaticKeyAuthenticator.ts. Required on every route not listed as exempt in this document's top-level description. See /api-reference/authentication.
Path Parameters
⌘I
cURL
# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Replay a recorded decision
curl "https://parmana-api-real.vercel.app/v2/evidence/record-123/replay" \
-H "Authorization: Bearer $PARMANA_API_KEY"// EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
// Replay a recorded decision
const response = await fetch(
"https://parmana-api-real.vercel.app/v2/evidence/record-123/replay",
{
method: "GET",
headers: { Authorization: `Bearer ${process.env.PARMANA_API_KEY}` },
},
);
console.log(response.status, await response.text());# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Replay a recorded decision
import os
import urllib.request
def main() -> None:
request = urllib.request.Request(
"https://parmana-api-real.vercel.app/v2/evidence/record-123/replay",
data=None,
method="GET",
headers={
"Authorization": "Bearer " + os.environ.get("PARMANA_API_KEY", ""),
},
)
with urllib.request.urlopen(request) as response:
print(response.status, response.read().decode("utf-8"))
if __name__ == "__main__":
main()const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay', 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://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/v2/evidence/{recordId}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"reproduced": true,
"differences": [],
"replayed": {
"outcome": "APPROVE"
}
}