Snapshot API
- Base URL:
https://snapshot.sls.epilot.io - API Docs: https://docs.epilot.io/api/snapshot
Point-in-time backups of epilot configuration with restore.
Quick Startโ
# List available operations
epilot snapshot
# Call an operation
epilot snapshot listSnapshots
Common Flagsโ
| Flag | Description |
|---|---|
-p key=value | Set a named parameter |
-d '{...}' | Request body JSON |
-H 'Key: Value' | Custom header |
-t, --token <token> | Bearer token for authentication |
--profile <name> | Use a named profile |
-s, --server <url> | Override server base URL |
-i, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operationsโ
Snapshots
listSnapshotsโ List snapshots for the caller's organization, newest first.createSnapshotโ Create a new snapshot of the given resources. Async โ returns immediatelycaptureOrgSnapshotโ Snapshot the caller's whole organization now. Creates ascope: "org"getSnapshotโ Fetch a snapshot's metadata. Poll this endpoint to track create/restore progress.deleteSnapshotโ Delete a snapshot's metadata and S3 manifest.restoreSnapshotโ Restore a snapshot to the org. Async โ returns immediately; client pollslistSnapshotResourcesโ List the resources captured in this snapshot. Returns lightweightgetSnapshotResourceโ Fetch one captured resource with its full payload. For UI viewslistDependenciesโ Walk the dependency tree for a set of resources and return the full
ScheduledSnapshots
getOrgSnapshotScheduleโ Return the scheduled-snapshot enrollment config for the caller's org.putOrgSnapshotScheduleโ Create or update the scheduled-snapshot enrollment config for thedeleteOrgSnapshotScheduleโ Remove the scheduled-snapshot enrollment for the caller's org.
listSnapshotsโ
List snapshots for the caller's organization, newest first.
GET /v1/snapshots
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | No | |
size | query | number | No | |
resource | query | string[] | No | Filter to snapshots containing one or more resources. Format |
<type>:<id>. Split on the first colon โ the <id> half may
contain colons (e.g., role acl ids like role:acl:internal:foo).
Repeat the |
| trigger | query | "manual" | "sync" | "blueprint_install" | "scheduled" | No | Filter to snapshots with a specific trigger. Uses the byTrigger GSI
for an efficient indexed query โ no table scan. Only snapshots created
after the GSI was added carry this index entry; pre-existin |
Sample Call
epilot snapshot listSnapshots
With JSONata filter:
epilot snapshot listSnapshots --jsonata 'results[0]'
Sample Response
{
"page_size": 0,
"cursor": "string",
"results": [
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": "manual",
"blueprint_instance_id": "string",
"resource_counts": {},
"create": {
"type": "create",
"started_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status": "in_progress",
"error": "string",
"triggered_by": {
"name": "string",
"user_id": "string",
"token_id": "string"
}
},
"restores": [
{
"type": "create",
"started_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status": "in_progress",
"error": "string",
"triggered_by": {
"name": "string",
"user_id": "string",
"token_id": "string"
}
}
],
"matched_count": 0,
"scope": "selection",
"expires_at": "1970-01-01T00:00:00.000Z",
"capture_summary": {
"total": 0,
"captured": 0,
"skipped": 0,
"failed": 0
}
}
]
}
createSnapshotโ
Create a new snapshot of the given resources. Async โ returns immediately
POST /v1/snapshots
Request Body (required)
Sample Call
epilot snapshot createSnapshot
With request body:
epilot snapshot createSnapshot \
-d '{
"name": "string",
"description": "string",
"trigger": "manual",
"blueprint_instance_id": "string",
"resources": [
{
"type": "string",
"id": "string"
}
]
}'
Using stdin pipe:
cat body.json | epilot snapshot createSnapshot
With JSONata filter:
epilot snapshot createSnapshot --jsonata '$'
captureOrgSnapshotโ
Snapshot the caller's whole organization now. Creates a scope: "org"
POST /v1/snapshots:capture-org
Request Body
Sample Call
epilot snapshot captureOrgSnapshot \
-d '{"name":"string","retention":{"value":1,"unit":"days"},"excluded_types":["string"]}'
Using stdin pipe:
cat body.json | epilot snapshot captureOrgSnapshot
With JSONata filter:
epilot snapshot captureOrgSnapshot --jsonata '$'
getSnapshotโ
Fetch a snapshot's metadata. Poll this endpoint to track create/restore progress.
GET /v1/snapshots/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Sample Call
epilot snapshot getSnapshot \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot snapshot getSnapshot 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot snapshot getSnapshot -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id'
Sample Response
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": "manual",
"blueprint_instance_id": "string",
"resource_counts": {},
"create": {
"type": "create",
"started_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status": "in_progress",
"error": "string",
"triggered_by": {
"name": "string",
"user_id": "string",
"token_id": "string"
}
},
"restores": [
{
"type": "create",
"started_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status": "in_progress",
"error": "string",
"triggered_by": {
"name": "string",
"user_id": "string",
"token_id": "string"
}
}
],
"matched_count": 0,
"scope": "selection",
"expires_at": "1970-01-01T00:00:00.000Z",
"capture_summary": {
"total": 0,
"captured": 0,
"skipped": 0,
"failed": 0
}
}
deleteSnapshotโ
Delete a snapshot's metadata and S3 manifest.
DELETE /v1/snapshots/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Sample Call
epilot snapshot deleteSnapshot \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot snapshot deleteSnapshot 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot snapshot deleteSnapshot -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
restoreSnapshotโ
Restore a snapshot to the org. Async โ returns immediately; client polls
POST /v1/snapshots/{id}:restore
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request Body
Sample Call
epilot snapshot restoreSnapshot \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-d '{"exclude_target_ids":["string"]}'
Using positional args for path parameters:
epilot snapshot restoreSnapshot 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot snapshot restoreSnapshot -p id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot snapshot restoreSnapshot -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
listSnapshotResourcesโ
List the resources captured in this snapshot. Returns lightweight
GET /v1/snapshots/{id}/resources
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Sample Call
epilot snapshot listSnapshotResources \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot snapshot listSnapshotResources 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot snapshot listSnapshotResources -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'resources'
Sample Response
{
"resources": [
{
"lineage_id": "string",
"target_id": "string",
"type": "string",
"name": "string"
}
]
}
getSnapshotResourceโ
Fetch one captured resource with its full payload. For UI views
GET /v1/snapshots/{id}/resources/{lineage_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
lineage_id | path | string | Yes |
Sample Call
epilot snapshot getSnapshotResource \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-p lineage_id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot snapshot getSnapshotResource 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot snapshot getSnapshotResource -p id=123e4567-e89b-12d3-a456-426614174000 -p lineage_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'lineage_id'
Sample Response
{
"lineage_id": "string",
"target_id": "string",
"type": "string",
"name": "string",
"captured": {}
}
getOrgSnapshotScheduleโ
Return the scheduled-snapshot enrollment config for the caller's org.
GET /v1/org-snapshot-schedule
Sample Call
epilot snapshot getOrgSnapshotSchedule
With JSONata filter:
epilot snapshot getOrgSnapshotSchedule --jsonata 'org_id'
Sample Response
{
"org_id": "string",
"enabled": true,
"cron_expression": "cron(0 2 * * ? *)",
"timezone": "string",
"retention": {
"value": 1,
"unit": "days"
},
"excluded_types": ["string"],
"schedule_name": "string",
"last_started_at": "1970-01-01T00:00:00.000Z",
"last_completed_at": "1970-01-01T00:00:00.000Z",
"last_status": "completed",
"created_by": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
putOrgSnapshotScheduleโ
Create or update the scheduled-snapshot enrollment config for the
PUT /v1/org-snapshot-schedule
Request Body
Sample Call
epilot snapshot putOrgSnapshotSchedule
With request body:
epilot snapshot putOrgSnapshotSchedule \
-d '{
"enabled": true,
"cron_expression": "cron(0 2 * * ? *)",
"timezone": "Europe/Berlin",
"retention": {
"value": 1,
"unit": "days"
},
"excluded_types": ["string"]
}'
Using stdin pipe:
cat body.json | epilot snapshot putOrgSnapshotSchedule
With JSONata filter:
epilot snapshot putOrgSnapshotSchedule --jsonata 'org_id'
Sample Response
{
"org_id": "string",
"enabled": true,
"cron_expression": "cron(0 2 * * ? *)",
"timezone": "string",
"retention": {
"value": 1,
"unit": "days"
},
"excluded_types": ["string"],
"schedule_name": "string",
"last_started_at": "1970-01-01T00:00:00.000Z",
"last_completed_at": "1970-01-01T00:00:00.000Z",
"last_status": "completed",
"created_by": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
deleteOrgSnapshotScheduleโ
Remove the scheduled-snapshot enrollment for the caller's org.
DELETE /v1/org-snapshot-schedule
Sample Call
epilot snapshot deleteOrgSnapshotSchedule
With JSONata filter:
epilot snapshot deleteOrgSnapshotSchedule --jsonata '$'
listDependenciesโ
Walk the dependency tree for a set of resources and return the full
POST /v1/snapshots:list-dependencies
Request Body (required)
Sample Call
epilot snapshot listDependencies \
-d '{"resources":[{"type":"string","id":"string"}]}'
Using stdin pipe:
cat body.json | epilot snapshot listDependencies
With JSONata filter:
epilot snapshot listDependencies --jsonata 'dependencies'
Sample Response
{
"dependencies": [
{
"type": "string",
"id": "string"
}
]
}