Preview a bundle before restore
curl --request POST \
--url http://localhost:3000/api/backup/preview \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"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
}
]
}
'import requests
url = "http://localhost:3000/api/backup/preview"
payload = {
"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
}
]
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
}
]
})
};
fetch('http://localhost:3000/api/backup/preview', 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/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/backup/preview"
payload := strings.NewReader("{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/backup/preview")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/backup/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"appCount": 123,
"snapshotCount": 123,
"annotationCount": 123,
"bundleVersion": "<string>"
}Backup
Preview a bundle before restore
Read-only — returns a summary of what would be replaced if this bundle
were restored. Use before calling POST /api/backup/restore.
POST
/
api
/
backup
/
preview
Preview a bundle before restore
curl --request POST \
--url http://localhost:3000/api/backup/preview \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"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
}
]
}
'import requests
url = "http://localhost:3000/api/backup/preview"
payload = {
"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
}
]
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
}
]
})
};
fetch('http://localhost:3000/api/backup/preview', 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/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/backup/preview"
payload := strings.NewReader("{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/backup/preview")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/backup/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"exportedAt\": 123,\n \"apps\": [\n {\n \"id\": 324684580,\n \"name\": \"Spotify - Music and Podcasts\",\n \"url\": \"https://apps.apple.com/us/app/spotify-music-and-podcasts/id324684580\",\n \"changeCount\": 2,\n \"bundleId\": \"com.spotify.client\",\n \"developer\": \"Spotify Ltd.\",\n \"privacyPolicyUrl\": \"<string>\",\n \"firstSeen\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"appCount": 123,
"snapshotCount": 123,
"annotationCount": 123,
"bundleVersion": "<string>"
}Authorizations
Same-origin CSRF check. The Origin header must match the request host;
enforced for every mutating verb (POST, PUT, PATCH, DELETE).
Body
application/json
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.