Trust Score History
curl --request GET \
--url https://api.truthlocks.com/v1/agents/{agentId}/trust-history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/trust-history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/trust-history', 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.truthlocks.com/v1/agents/{agentId}/trust-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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://api.truthlocks.com/v1/agents/{agentId}/trust-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.truthlocks.com/v1/agents/{agentId}/trust-history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/agents/{agentId}/trust-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"history": [
{
"score": 0.5,
"timestamp": "2023-11-07T05:31:56Z",
"factors": {}
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Trust & Witness
Trust Score History
Retrieve historical trust score data for a machine agent over time
GET
/
v1
/
agents
/
{agentId}
/
trust-history
Trust Score History
curl --request GET \
--url https://api.truthlocks.com/v1/agents/{agentId}/trust-history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/trust-history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/trust-history', 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.truthlocks.com/v1/agents/{agentId}/trust-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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://api.truthlocks.com/v1/agents/{agentId}/trust-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.truthlocks.com/v1/agents/{agentId}/trust-history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/agents/{agentId}/trust-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"history": [
{
"score": 0.5,
"timestamp": "2023-11-07T05:31:56Z",
"factors": {}
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Returns a time-series of trust score computations for a specific agent. Use this endpoint to visualize trust trends, detect score degradation, and audit score changes following incidents. Results are ordered chronologically (oldest first).
Authentication
RequiresX-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.
Path Parameters
string
required
The unique identifier of the machine agent. Format:
maip-agent:ULID.Query Parameters
string
ISO 8601 start timestamp for the history window. Defaults to 30 days ago.
string
ISO 8601 end timestamp for the history window. Defaults to now.
integer
default:"100"
Maximum number of records to return. Range:
1-1000.Response
string
The agent identifier.
array
Array of historical trust score records, ordered by
computed_at ascending.Show History record fields
Show History record fields
number
Trust score at the time of computation (
0.0-1.0).object
string
ISO 8601 timestamp of when this score was computed.
integer
Total number of records matching the query window (before limit is applied).
Authorizations
API key for machine-to-machine authentication
Path Parameters
Agent identifier
Query Parameters
Start of time range (ISO 8601)
End of time range (ISO 8601)
Required range:
1 <= x <= 500Response
Trust score history
Show child attributes
Show child attributes

