Export a privacy-minimized evidence snapshot
curl --request GET \
--url https://api.pyai.com/v1/trace/evidence-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/trace/evidence-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/trace/evidence-snapshot', 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://api.pyai.com/v1/trace/evidence-snapshot",
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: Bearer <token>"
],
]);
$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://api.pyai.com/v1/trace/evidence-snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/trace/evidence-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/trace/evidence-snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"snapshot_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"schema_version": "trace-evidence-v1",
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"coverage": {
"calls_scanned": 123,
"calls_with_gap": 123,
"coverage_rate": 123
},
"verdicts": {
"PASS": 123,
"WARN": 123,
"FAIL": 123
},
"packs": [
{
"id": "<string>",
"version": "<string>"
}
],
"rule_hits": [
{
"rule_id": "<string>",
"count": 123,
"severity_counts": {}
}
],
"tier2": {
"findings_count": 123,
"pending_or_advisory": true
},
"integrity": {
"audit_hashes_present": 123,
"audit_chain_verified": false
}
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Trace
Export a privacy-minimized evidence snapshot
Returns aggregate Trace evidence for an explicit UTC closed-open ingestion-time period (scorecard created_at) of up to 31 days and 10,000 scored calls. Shorten the window if it exceeds 100,000 rule hits or advisory findings. It excludes transcripts, recordings, caller identifiers, redaction previews, and call-level IDs. Counts represent calls scored by Trace and do not certify compliance. Requires trace:read.
GET
/
v1
/
trace
/
evidence-snapshot
Export a privacy-minimized evidence snapshot
curl --request GET \
--url https://api.pyai.com/v1/trace/evidence-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/trace/evidence-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/trace/evidence-snapshot', 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://api.pyai.com/v1/trace/evidence-snapshot",
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: Bearer <token>"
],
]);
$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://api.pyai.com/v1/trace/evidence-snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/trace/evidence-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/trace/evidence-snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"snapshot_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"schema_version": "trace-evidence-v1",
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"coverage": {
"calls_scanned": 123,
"calls_with_gap": 123,
"coverage_rate": 123
},
"verdicts": {
"PASS": 123,
"WARN": 123,
"FAIL": 123
},
"packs": [
{
"id": "<string>",
"version": "<string>"
}
],
"rule_hits": [
{
"rule_id": "<string>",
"count": 123,
"severity_counts": {}
}
],
"tier2": {
"findings_count": 123,
"pending_or_advisory": true
},
"integrity": {
"audit_hashes_present": 123,
"audit_chain_verified": false
}
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Authorizations
apiKeyxApiKey
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Response
Privacy-minimized evidence snapshot
Available options:
trace-evidence-v1 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes