curl --request GET \
--url http://localhost:3000/api/backup/export \
--header 'X-Auditor-Admin-Token: <api-key>'import requests
url = "http://localhost:3000/api/backup/export"
headers = {"X-Auditor-Admin-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auditor-Admin-Token': '<api-key>'}};
fetch('http://localhost:3000/api/backup/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/backup/export",
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-Auditor-Admin-Token: <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 := "http://localhost:3000/api/backup/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auditor-Admin-Token", "<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("http://localhost:3000/api/backup/export")
.header("X-Auditor-Admin-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/backup/export")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Auditor-Admin-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"version": 1,
"exportedAt": 123,
"apps": [
{
"id": 324684580,
"name": "Spotify - Music and Podcasts",
"url": "https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580",
"changeCount": 2,
"bundleId": "com.spotify.client",
"developer": "Spotify Ltd.",
"privacyPolicyUrl": "<string>",
"firstSeen": 123
}
]
}{
"error": "Admin token required"
}Export a versioned backup bundle
Returns a JSON bundle with every app, label, snapshot, annotation, notification, focus state, and feature-flag override. Signed with this install’s key, so it restores here without extra flags.
This read requires the admin token whenever AUDITOR_ADMIN_TOKEN is
set OR the instance is network-exposed. /api/backup/ is one of the
proxy’s gated read prefixes, and this handler additionally checks
adminTokenConfigured() || isNetworkExposed() — so a loopback-only
install with a token configured still gets a 401.
curl --request GET \
--url http://localhost:3000/api/backup/export \
--header 'X-Auditor-Admin-Token: <api-key>'import requests
url = "http://localhost:3000/api/backup/export"
headers = {"X-Auditor-Admin-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auditor-Admin-Token': '<api-key>'}};
fetch('http://localhost:3000/api/backup/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/backup/export",
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-Auditor-Admin-Token: <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 := "http://localhost:3000/api/backup/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auditor-Admin-Token", "<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("http://localhost:3000/api/backup/export")
.header("X-Auditor-Admin-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/backup/export")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Auditor-Admin-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"version": 1,
"exportedAt": 123,
"apps": [
{
"id": 324684580,
"name": "Spotify - Music and Podcasts",
"url": "https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580",
"changeCount": 2,
"bundleId": "com.spotify.client",
"developer": "Spotify Ltd.",
"privacyPolicyUrl": "<string>",
"firstSeen": 123
}
]
}{
"error": "Admin token required"
}Authorizations
Required when AUDITOR_ADMIN_TOKEN is set in the environment, and — on a
network-exposed instance — on the sensitive read prefixes listed on the
Overview page. Verified with
crypto.timingSafeEqual. Missing or wrong token returns 401. Failed
attempts are recorded in audit_log with IP + user agent.
Browser callers may send the pt_admin_token HttpOnly cookie instead;
it is accepted everywhere this header is. Obtain it from
POST /api/auth/admin-token/login.
Response
JSON bundle.
Versioned export of every app, label, snapshot, annotation, notification, focus state, and feature-flag override. Restorable into any release that understands this bundle format or a later one.
Exported envelopes also carry a signature object (HMAC-SHA256 over
the canonicalised envelope, keyed per install). Restoring a bundle
whose signature doesn't match the target install requires
allowUntrusted — see POST /api/backup/restore.