> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# List application snapshots

> List the stored snapshots of an application with GET /v2/apps/{app_id}/snapshots, each with its size, date, download URL and the IDs to restore it.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Requires an API key with the `snapshots:read` [scope](/en/api-reference/authentication#scopes).

List Snapshots returns every snapshot stored for an application, each with its size, last-modified date, and a signed `url` for downloading it. Use it to build a restore picker, or to confirm a snapshot from [Create Snapshot](/en/api-reference/endpoint/apps/snapshots/create) has finished generating after a `202 SNAPSHOT_PROCESSING` response, poll this endpoint rather than re-posting to create.

The result is cached for 30 minutes per owner/application pair, so a snapshot that just finished generating in the background may take a short while to show up here even after the cluster has written it. Once you have a snapshot's `name` and `version_id`, pass them as `snapshotId` and `versionId` to [Restore Snapshot](/en/api-reference/endpoint/apps/snapshots/restore) to roll the application back to that point.

Snapshots are only available with an active plan, the daily snapshot quota scales with the application's RAM allocation. On workspace-shared applications the caller needs the `admin` [role](/en/api-reference/endpoint/workspace/members/invite#roles).

## Parameters

<ParamField path="app_id" type="string" placeholder="Application ID" required>
  The ID of the application. You can find this in the URL of your application's dashboard.
</ParamField>

## Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful: `success` if it was, `error` if not.
</ResponseField>

<ResponseField name="response" type="object">
  The contents of the response.

  <Expandable title="Toggle object">
    <ResponseField name="name" type="string">
      The snapshot's name: the application ID, optionally suffixed with `_<runtime>` and `_<origin>`. Pass it unchanged as `snapshotId` when restoring.
    </ResponseField>

    <ResponseField name="size" type="number">
      Size of the backup in bytes.
    </ResponseField>

    <ResponseField name="modified" type="string">
      Date of the last modification of the backup.
    </ResponseField>

    <ResponseField name="key" type="string">
      The signed query string of the download URL.
    </ResponseField>

    <ResponseField name="version_id" type="string">
      The snapshot's version. Pass it as `versionId` when restoring.
    </ResponseField>

    <ResponseField name="url" type="string">
      A signed URL that downloads the snapshot, valid for 30 days.
    </ResponseField>

    <ResponseField name="runtime" type="string | null">
      Runtime the snapshot was taken from: the application's language (`javascript`, `python`, `rust`...) or the database engine (`mongo`, `mysql`, `postgres`, `redis`). `null` on snapshots taken before this field existed.
    </ResponseField>

    <ResponseField name="origin" type="string | null">
      How the snapshot was created: `manual` (requested through the API, dashboard or CLI) or `automatic` (the daily scheduled snapshot). `null` on older snapshots.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={"system"}
  {
    "status": "success",
    "response": [
      {
        "name": "1d2cdc0d6ebd435c91315c6329d12eab_javascript_manual",
        "size": 12900705,
        "modified": "2024-06-27T06:23:42.326Z",
        "key": "AWSAccessKeyId=access key",
        "version_id": "3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrHY",
        "url": "https://snapshots.squarecloud.app/applications/<account_id>/<name>.zip?<signed-query-string>",
        "runtime": "javascript",
        "origin": "manual"
      },
      {
        "name": "1d2cdc0d6ebd435c91315c6329d12eab_javascript_automatic",
        "size": 12900705,
        "modified": "2024-06-26T07:05:40.000Z",
        "key": "AWSAccessKeyId=access key",
        "version_id": "Qm8cFZ2vY1tBn4LhXw0e.KpR7sUjD9aGz",
        "url": "https://snapshots.squarecloud.app/applications/<account_id>/<name>.zip?<signed-query-string>",
        "runtime": "javascript",
        "origin": "automatic"
      },
      {
        "name": "1d2cdc0d6ebd435c91315c6329d12eab",
        "size": 12900705,
        "modified": "2024-06-25T05:15:51.533Z",
        "key": "AWSAccessKeyId=access key",
        "version_id": "yT5wN0cE3hJ.bV8mLq2XoZr6dAiK4sPf",
        "url": "https://snapshots.squarecloud.app/applications/<account_id>/<name>.zip?<signed-query-string>",
        "runtime": null,
        "origin": null
      }
    ]
  }
  ```
</ResponseExample>

<Note>Download a snapshot from its `url`. The link stays valid for 30 days.</Note>

## Common errors

| Code | HTTP | Meaning |
| - | - | - |
| `APP_NOT_FOUND` | 404 | No application with that ID exists for the resolved owner. |

## Related

* CLI: [`squarecloud app snapshot list`](/en/cli-reference/snapshots#squarecloud-app-snapshot-list)
* SDKs: [`api.apps.snapshots.list()`](/en/sdks/js/snapshots) (JavaScript), [`client.apps.snapshots.list()`](/en/sdks/py/snapshots) (Python), [`c.Apps.Snapshots.List()`](/en/sdks/go/snapshots) (Go)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.