Snapshots
Library versioning through point-in-time snapshots with restore capability.
GET /api/libraries/{id}/snapshots
List all snapshots for a library.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Library ID or natural ID |
Response:
An array of the library's snapshots, newest first.
[
{
"id": "00000000-0000-4000-8000-000000000001",
"trigger": "manual",
"createdAt": "2026-01-15T16:20:00.000Z",
"fileCount": 2
}
]
POST /api/libraries/{id}/snapshots
Create a new snapshot of the library.
Authentication: Required
Permissions: Requires library:write permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Library ID or natural ID |
Request Body:
| Field | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Maximum number of snapshots to keep (1-100) |
trigger | string | "manual" | Trigger type: manual, refresh, scheduled |
Example:
{
"limit": 10,
"trigger": "manual"
}
Response:
Responds 201 Created with the new snapshot.
{
"trigger": "manual",
"limit": 10
}
{
"_links": {
"self": {
"href": "https://informer.example.com/api/libraries/admin%3Aengineering-docs/snapshots"
}
},
"id": "00000000-0000-4000-8000-000000000001",
"fileCount": 3,
"trigger": "manual",
"createdAt": "2026-01-15T16:20:00.000Z"
}
If the snapshot count exceeds limit, the oldest snapshots are automatically deleted to maintain the limit.
POST /api/libraries/{id}/snapshots/{snapshotId}/_restore
Restore the library to a previous snapshot state.
Authentication: Required
Permissions: Requires library:write permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Library ID or natural ID |
snapshotId | string (UUID) | Snapshot ID |
Response:
Responds 200 with the restored file count.
{
"_links": {
"self": {
"href": "https://informer.example.com/api/libraries/admin%3Aengineering-docs/snapshots/00000000-0000-4000-8000-000000000001/_restore"
}
},
"restored": true,
"fileCount": 3
}
Restoring a snapshot deletes all current files in the library and replaces them with the snapshot's files. This cannot be undone unless you create a snapshot beforehand.
DELETE /api/libraries/{id}/snapshots/{snapshotId}
Delete a specific snapshot.
Authentication: Required
Permissions: Requires library:write permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Library ID or natural ID |
snapshotId | string (UUID) | Snapshot ID |
Response:
Responds 204 No Content.