Backups and Restores#

Backup and restore management for cloud instances

List cloud backups#

GET/organizations/{org_id}/cloud/instances/{instance_id}/backups

List backups for a cloud instance

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
offsetintegerqueryNoNumber of items to skip
limitintegerqueryNoMaximum number of items to return

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backups?offset=0&limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "backup_id": "ci-001ab-1737200000",
      "backup_type": "on_demand",
      "status": "pending",
      "location": "string",
      "table_names": [
        "string"
      ],
      "retention_days": 0,
      "size_bytes": 0,
      "error_message": "string",
      "started_at": "2025-10-02T15:30:00Z",
      "completed_at": "2025-10-02T15:30:00Z",
      "expires_at": "2025-10-02T15:30:00Z",
      "created_at": "2025-10-02T15:30:00Z",
      "updated_at": "2025-10-02T15:30:00Z"
    }
  ],
  "total": 0
}

Create on-demand backup#

POST/organizations/{org_id}/cloud/instances/{instance_id}/backups

Trigger an on-demand backup for the cloud instance

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Code Examples#

curl -X POST "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backups" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "backup_id": "ci-001ab-1737200000",
  "backup_type": "on_demand",
  "status": "pending",
  "location": "string",
  "table_names": [
    "string"
  ],
  "retention_days": 0,
  "size_bytes": 0,
  "error_message": "string",
  "started_at": "2025-10-02T15:30:00Z",
  "completed_at": "2025-10-02T15:30:00Z",
  "expires_at": "2025-10-02T15:30:00Z",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

Get cloud backup#

GET/organizations/{org_id}/cloud/instances/{instance_id}/backups/{backup_record_id}

Get details of a specific backup

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
backup_record_idstringpathYesBackup record ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backups/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "backup_id": "ci-001ab-1737200000",
  "backup_type": "on_demand",
  "status": "pending",
  "location": "string",
  "table_names": [
    "string"
  ],
  "retention_days": 0,
  "size_bytes": 0,
  "error_message": "string",
  "started_at": "2025-10-02T15:30:00Z",
  "completed_at": "2025-10-02T15:30:00Z",
  "expires_at": "2025-10-02T15:30:00Z",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

Delete cloud backup#

DELETE/organizations/{org_id}/cloud/instances/{instance_id}/backups/{backup_record_id}

Delete a backup record

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
backup_record_idstringpathYesBackup record ID

Code Examples#

curl -X DELETE "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backups/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

No response body

Restore from backup#

POST/organizations/{org_id}/cloud/instances/{instance_id}/restore

Restore a cloud instance from a backup using overwrite mode

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Request Body#

{
  "backup_id": "string",
  "table_names": [
    "string"
  ]
}

Code Examples#

curl -X POST "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/restore" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"backup_id": "string",
"table_names": [
  "string"
]
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "backup_id": "string",
  "location": "string",
  "status": "pending",
  "restore_mode": "overwrite",
  "table_names": [
    "string"
  ],
  "error_message": "string",
  "started_at": "2025-10-02T15:30:00Z",
  "completed_at": "2025-10-02T15:30:00Z",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

List cloud restores#

GET/organizations/{org_id}/cloud/instances/{instance_id}/restores

List restore operations for a cloud instance

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
offsetintegerqueryNoNumber of items to skip
limitintegerqueryNoMaximum number of items to return

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/restores?offset=0&limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "backup_id": "string",
      "location": "string",
      "status": "pending",
      "restore_mode": "overwrite",
      "table_names": [
        "string"
      ],
      "error_message": "string",
      "started_at": "2025-10-02T15:30:00Z",
      "completed_at": "2025-10-02T15:30:00Z",
      "created_at": "2025-10-02T15:30:00Z",
      "updated_at": "2025-10-02T15:30:00Z"
    }
  ],
  "total": 0
}

Get cloud restore#

GET/organizations/{org_id}/cloud/instances/{instance_id}/restores/{restore_id}

Get details of a specific restore operation

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
restore_idstringpathYesRestore operation ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/restores/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "backup_id": "string",
  "location": "string",
  "status": "pending",
  "restore_mode": "overwrite",
  "table_names": [
    "string"
  ],
  "error_message": "string",
  "started_at": "2025-10-02T15:30:00Z",
  "completed_at": "2025-10-02T15:30:00Z",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

Get backup download URL#

GET/organizations/{org_id}/cloud/instances/{instance_id}/backups/{backup_record_id}/download

Get a presigned URL to download a completed backup

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
backup_record_idstringpathYesBackup record ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backups/550e8400-e29b-41d4-a716-446655440000/download" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "download_url": "https://platform.antfly.io",
  "expires_at": "2026-01-01T00:00:00Z"
}

Get backup schedule#

GET/organizations/{org_id}/cloud/instances/{instance_id}/backup-schedule

Get the backup schedule configuration for a cloud instance

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backup-schedule" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "schedule": "0 2 * * *",
  "retention_days": 7,
  "enabled": true,
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

Update backup schedule#

PUT/organizations/{org_id}/cloud/instances/{instance_id}/backup-schedule

Create or update the backup schedule for a cloud instance

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Request Body#

{
  "schedule": "0 2 * * *",
  "retention_days": 1,
  "enabled": true
}

Code Examples#

curl -X PUT "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/backup-schedule" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"schedule": "0 2 * * *",
"retention_days": 1,
"enabled": true
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "schedule": "0 2 * * *",
  "retention_days": 7,
  "enabled": true,
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}