Verify audit chain
curl --request GET \
--url https://api.hq.zone/v1/admin/audit/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/admin/audit/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/admin/audit/verify', 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.hq.zone/v1/admin/audit/verify",
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.hq.zone/v1/admin/audit/verify"
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.hq.zone/v1/admin/audit/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/admin/audit/verify")
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{
"checked": 123,
"ok": true,
"broken_at_seq": 123,
"broken_reason": "<string>",
"first_seq": 123,
"last_seq": 123
}Admin
Verify audit chain
Re-walks the workspace’s tamper-evident audit hash chain and reports whether it is intact. Admin only. Checks the most recent entries (the limit query parameter defaults to 10000 and is clamped to 1-100000), recomputing each entry’s hash and verifying it links to its predecessor. Returns whether the chain is ok, how many entries were checked, the first and last sequence numbers covered, and, if broken, the sequence number where it first fails and whether the break is a content or linkage mismatch.
GET
/
v1
/
admin
/
audit
/
verify
Verify audit chain
curl --request GET \
--url https://api.hq.zone/v1/admin/audit/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/admin/audit/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/admin/audit/verify', 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.hq.zone/v1/admin/audit/verify",
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.hq.zone/v1/admin/audit/verify"
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.hq.zone/v1/admin/audit/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/admin/audit/verify")
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{
"checked": 123,
"ok": true,
"broken_at_seq": 123,
"broken_reason": "<string>",
"first_seq": 123,
"last_seq": 123
}Authorizations
bearer_patoauth2
Query Parameters
Response
Chain verification result