> For the complete documentation index, see [llms.txt](https://docs.discloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discloud.com/en/api-and-integrations/api-overview/snapshot.md).

# Snapshot

## List versioned backups

> Returns all versioned backups for the authenticated user. Filter by appID or paginate results.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Snapshot","description":"Operations about versioned backups (snapshots)"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/snapshot":{"get":{"tags":["Snapshot"],"summary":"List versioned backups","description":"Returns all versioned backups for the authenticated user. Filter by appID or paginate results.","operationId":"listSnapshots","parameters":[{"name":"page","in":"query","required":false,"description":"Page number (must be >= 1)","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","required":false,"description":"Number of items per page (1–200)","schema":{"type":"integer","default":50,"minimum":1,"maximum":200}},{"name":"summary","in":"query","required":false,"description":"If true, returns a summarized view of each backup","schema":{"type":"boolean","default":false}},{"name":"appID","in":"query","required":false,"description":"Filter backups by a specific app ID (letters, numbers, hyphen; max 40 chars)","schema":{"type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9\\-]+$"}}],"responses":{"200":{"description":"Backups retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No backups found for the given appID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Generate backup download link

> Generates a temporary download URL for a specific versioned backup.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Snapshot","description":"Operations about versioned backups (snapshots)"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/snapshot/{appID}/versions/{version}":{"get":{"tags":["Snapshot"],"summary":"Generate backup download link","description":"Generates a temporary download URL for a specific versioned backup.","operationId":"getSnapshotDownloadUrl","parameters":[{"name":"appID","in":"path","required":true,"description":"App ID (letters, numbers, hyphen; max 40 chars)","schema":{"type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9\\-]+$"}},{"name":"version","in":"path","required":true,"description":"Backup version in format YYYYMMDD-HHMMSS","schema":{"type":"string","pattern":"^\\d{8}-\\d{6}$"}}],"responses":{"200":{"description":"Download link generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"app":{"type":"object","properties":{"id":{"type":"string"}}},"download":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"version":{"type":"string"},"size":{"type":"integer"}}}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Backup version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## List backups for an app

> Returns all versioned backups for a specific application.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Snapshot","description":"Operations about versioned backups (snapshots)"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/snapshot/{appID}":{"get":{"tags":["Snapshot"],"summary":"List backups for an app","description":"Returns all versioned backups for a specific application.","operationId":"listAppSnapshots","parameters":[{"name":"appID","in":"path","required":true,"description":"App ID (letters, numbers, hyphen; max 40 chars)","schema":{"type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9\\-]+$"}}],"responses":{"200":{"description":"Backups loaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"app":{"type":"object","properties":{"id":{"type":"string"}}},"versions":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Invalid App ID format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No backups found for this app","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create versioned backup

> Creates a new versioned backup (snapshot) for a specific application.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Snapshot","description":"Operations about versioned backups (snapshots)"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/snapshot/{appID}":{"post":{"tags":["Snapshot"],"summary":"Create versioned backup","description":"Creates a new versioned backup (snapshot) for a specific application.","operationId":"createSnapshot","parameters":[{"name":"appID","in":"path","required":true,"description":"App ID (letters, numbers, hyphen; max 40 chars)","schema":{"type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9\\-]+$"}}],"responses":{"200":{"description":"Versioned backup created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"app":{"type":"object","properties":{"id":{"type":"string"}}},"snapshot":{"type":"object","properties":{"version":{"type":"string"},"size":{"type":"string"},"url":{"type":"string"},"allVersions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"size":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"400":{"description":"Invalid appID format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not the owner of this application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Application not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Application is busy processing another task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
