Backups

List Backups

GET /v1/workspaces/{workspaceId}/backups

Lists all backups for the specified workspace. Supports pagination for large data sets.

Parameters

NAME TYPE IN DESCRIPTION DEFAULT VALUE
workspaceId int32 path The workspace ID. None
take int32 query The number of backups to return in the response. 20
skip int32 query The number of backups to skip before returning results. 0

Responses

Code Message Action
200 OK Returns a list of backup records in the workspace.

Response Example:

1
2
3
4
5
6
7
8
9
10
11
12
{
  "data": [
    {
      "id": 123,
      "name": "Workspace Backup 1",
      "created": "2023-10-02T14:15:15.307Z",
      "modified": "2023-10-02T15:15:15.307Z",
      "scheduled": true
    }
  ],
  "hasMore": true
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups?take=20&skip=0" \
  -H "Authorization:  <access_token>"

Get Backup Details

GET /v1/workspaces/{workspaceId}/backups/{backupId}

Retrieves details of a specific backup, identified by the backupId.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID to retrieve details for.

Responses

Code Message Action
200 OK Returns the details of the specified backup.

Response Example:

1
2
3
4
5
6
7
{
  "id": 123,
  "name": "Workspace Backup 1",
  "created": "2023-10-02T14:15:15.307Z",
  "modified": "2023-10-02T15:15:15.307Z",
  "scheduled": true
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups/456" \
  -H "Authorization: <access_token>"

List Snapshots

GET /v1/workspaces/{workspaceId}/backups/{backupId}/snapshots

Lists all created snapshots for the specified backup in a workspace. Supports filtering by date range and status.

Parameters

NAME TYPE IN DESCRIPTION DEFAULT VALUE
workspaceId int32 path The workspace ID. None
backupId int32 path The backup ID to list snapshots for. None
startDate string query The start date for filtering snapshots (ISO 8601 format). None
endDate string query The end date for filtering snapshots (ISO 8601 format). None
failed boolean query Whether to filter by failed snapshots only. None
take int32 query The number of snapshots to return in the response. 20
skip int32 query The number of snapshots to skip before returning results. 0

Responses

Code Message Action
200 OK Returns a list of snapshot for the backup.

Response Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "data": [
    {
      "snapshotId": 789,
      "queueTime": "2023-10-02T14:15:15.307Z",
      "startTime": "2023-10-02T14:20:15.307Z",
      "endTime": "2023-10-02T15:15:15.307Z",
      "state": "Succeeded",
      "runBySchedule

": true
    }
  ],
  "hasMore": true
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups/456/snapshots?take=20&skip=0" \
  -H "Authorization:  <access_token>"

Create Snapshot

POST /v1/workspaces/{workspaceId}/backups/{backupId}/snapshots

Creates a snapshot for the specified backup in the workspace.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID to run the snapshot for.

Request Body

NAME TYPE DESCRIPTION
mode string Specifies the mode (to be clarified).
params object Additional snapshot parameters (to be clarified).

Request Body Example

1
2
3
4
{
  "mode": "full",
  "params": {}
}

Responses

Code Message Action
200 OK Returns the snapshot creation status.

Response Example:

1
2
3
4
5
6
7
8
{
  "runId": 123,
  "date": "2023-10-02T14:15:15.307Z",
  "duration": 300,
  "state": "Running",
  "successRows": 1000,
  "errorRows": 0
}

Request Example

1
2
3
4
5
6
7
curl -X POST "https://api.skyvia.com/v1/workspaces/123/backups/456/snapshots" \
  -H "Authorization:  <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "mode": "full",
        "params": {}
      }'

Get Snapshot Details

GET /v1/workspaces/{workspaceId}/backups/{backupId}/snapshots/{snapshotId}

Retrieves details of a specific snapshot for the backup in the workspace.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID for which the snapshot details are being requested.
snapshotId int32 path The snapshot ID to retrieve details for.

Responses

Code Message Action
200 OK Returns the details of the specified snapshot.

Response Example:

1
2
3
4
5
6
7
8
9
{
  "snapshotId": 789,
  "queueTime": "2023-10-02T14:15:15.307Z",
  "startTime": "2023-10-02T14:20:15.307Z",
  "endTime": "2023-10-02T15:15:15.307Z",
  "state": "Succeeded",
  "log": "Backup completed successfully.",
  "runBySchedule": true
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups/456/snapshots/789" \
  -H "Authorization:  <access_token>"

Get Active Snapshot Details

GET /v1/workspaces/{workspaceId}/backups/{backupId}/snapshots/active

Retrieves the details of the active snapshot for the specified backup.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID for which to retrieve active snapshot execution.

Responses

Code Message Action
200 OK Returns the details of the active snapshot execution.

Response Example:

1
2
3
4
5
6
7
8
{
  "runId": 123,
  "date": "2023-10-02T14:15:15.307Z",
  "duration": 600,
  "state": "Running",
  "successRows": 1000,
  "errorRows": 0
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups/456/snapshots/active" \
  -H "Authorization:  <access_token>"

Get Backup Schedule Status

GET /v1/workspaces/{workspaceId}/backups/{backupId}/schedule

Retrieves the schedule status of the specified backup in the workspace.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID to retrieve the schedule status for.

Responses

Code Message Action
200 OK Returns the schedule for the specified backup.

Response Example:

1
2
3
{
  "active": true
}

Request Example

1
2
curl -X GET "https://api.skyvia.com/v1/workspaces/123/backups/456/schedule" \
  -H "Authorization:  <access_token>"

Enable Backup Schedule

POST /v1/workspaces/{workspaceId}/backups/{backupId}/schedule/enable

Enables the backup schedule for the specified backup in the workspace.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID to enable the schedule for.

Responses

Code Message Action
200 OK Confirms that the backup schedule is enabled.

Request Example

1
2
curl -X POST "https://api.skyvia.com/v1/workspaces/123/backups/456/schedule/enable" \
  -H "Authorization:  <access_token>"

Disable Backup Schedule

POST /v1/workspaces/{workspaceId}/backups/{backupId}/schedule/disable

Disables the backup schedule for the specified backup in the workspace.

Parameters

NAME TYPE IN DESCRIPTION
workspaceId int32 path The workspace ID.
backupId int32 path The backup ID to disable the schedule for.

Responses

Code Message Action
200 OK Confirms that the backup schedule is disabled.

Request Example

1
2
curl -X POST "https://api.skyvia.com/v1/workspaces/123/backups/456/schedule/disable" \
  -H "Authorization:  <access_token>"