younifyd
Menu

Get Datasets Datasetname Backups

List backups

GET/datasets/{datasetName}/backups

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Get Datasets Datasetname Backups action (under Backups).
  3. Fill in the fields below, then reference the result from later steps as {{getDatasetsDatasetnameBackups.response.data}}.

Request

Path parameters

datasetNamestringrequired

Name of the dataset

Query parameters

limitinteger

Max number of backups returned. The response contains the most recent backups, ordered oldest first.

Default 10

afterstring (date)

Only return backups created on or after this date (`YYYY-MM-DD`). Matched against the date in the backup ID.

beforestring (date)

Only return backups created before this date (`YYYY-MM-DD`). Backups from this date are excluded. Matched against the date in the backup ID.

Response

Returns 200 with an object. Read it in later steps with {{getDatasetsDatasetnameBackups.response.data.<field>}}.

backupsarray<object>

The most recent backups, up to `limit`, ordered oldest first.

idstringrequired

The backup ID, in the format `YYYY-MM-DD-<uuid>`. The date is the day the backup was created.

createdAtstring (date-time)required

When the backup was created

limitinteger

The `limit` used for the request. This is the default of 10 if you didn't pass one.

json
{
  "backups": [
    {
      "id": "string",
      "createdAt": "2025-01-01T00:00:00Z"
    }
  ],
  "limit": 0
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.