GET /api/self-audit/reports Bearer

List Self-Audit Reports

List recent self-audit daemon reports generated by PocketPaw's background security monitoring. Each report contains results from 12 automated checks with timestamps and findings.

Overview

Returns a list of recent self-audit reports generated by the self-audit daemon. Reports are stored as JSON files and sorted by date (most recent first).

Response

Returns an array of report summary objects:

date string
Report date in YYYY-MM-DD format
total integer
Total number of checks in the report
passed integer
Number of passing checks
issues integer
Number of issues found
Terminal window
curl -X GET "http://localhost:8000/api/self-audit/reports" \
-H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/self-audit/reports", {
headers: { "Authorization": "Bearer <token>" }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"http://localhost:8000/api/self-audit/reports",
headers={"Authorization": "Bearer <token>"}
)
print(response.json())
[
{
"date": "2024-01-15",
"total": 12,
"passed": 10,
"issues": 2
},
{
"date": "2024-01-14",
"total": 12,
"passed": 12,
"issues": 0
}
]
Request
curl -X GET "http://localhost:8000/api/self-audit/reports" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/self-audit/reports", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.get(
    "http://localhost:8000/api/self-audit/reports",
    headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("GET", "http://localhost:8000/api/self-audit/reports", 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