POST
/api/self-audit/run BearerTrigger Self-Audit
Trigger an immediate run of PocketPaw's self-audit daemon. Executes all 12 background security and operational checks and saves a new report accessible via the audit reports endpoint.
Overview
Triggers an immediate run of the self-audit daemon’s 12 checks and returns the full report. The report is also saved to disk for future retrieval via the reports endpoint.
Response
Returns the full audit report (same format as the individual report endpoint):
date stringToday’s date
total integerTotal checks executed (always 12)
passed integerNumber of passing checks
issues integerNumber of issues found
checks arrayDetailed results array
curl -X POST "http://localhost:8000/api/self-audit/run" \ -H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/self-audit/run", { method: "POST", headers: { "Authorization": "Bearer <token>" }});const data = await response.json();console.log(data);import requests
response = requests.post( "http://localhost:8000/api/self-audit/run", headers={"Authorization": "Bearer <token>"})print(response.json()){ "date": "2024-01-15", "total": 12, "passed": 11, "issues": 1, "checks": [ {"name": "config_permissions", "passed": true, "message": "OK", "severity": "info"}, {"name": "audit_log_integrity", "passed": true, "message": "OK", "severity": "info"}, {"name": "memory_store_health", "passed": false, "message": "Qdrant unreachable", "severity": "warning"} ]}Was this page helpful?
Request
curl -X POST "http://localhost:8000/api/self-audit/run" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/self-audit/run", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
});
const data = await response.json();
console.log(data);import requests
response = requests.post(
"http://localhost:8000/api/self-audit/run",
headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)
print(response.json())package main
import (
"fmt"
"net/http"
"io"
)
func main() {
req, _ := http.NewRequest("POST", "http://localhost:8000/api/self-audit/run", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Response
Send a request to see the response
Authorization
Headers
Body
Response