Skip to content

Database Backups (admin) API

Base URL: https://YOUR-SERVER/api. Send your API key in x-api-key where authentication is required. A key also needs the listed permission; your account's access rules still apply.

API guide · All endpoints · OpenAPI JSON

Delete database backup

DELETE /api/admin/database-backups

Delete a backup by its filename

Administrator access required.

Authentication: API key. Permission: backup.delete.

Request body

Required.

Field definitions: DatabaseBackupDeleteDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/DatabaseBackupDeleteDto"
    }
  }
}

Responses

{
  "200": {
    "description": ""
  }
}

List database backups

GET /api/admin/database-backups

Get the list of the successful and failed backups

Administrator access required.

Authentication: API key. Permission: maintenance.

Responses

Field definitions: DatabaseBackupListResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DatabaseBackupListResponseDto"
        }
      }
    },
    "description": ""
  }
}

Get backup restore verification

GET /api/admin/database-backups/restore-verification

When restoring the database and the original files was last proved, and whether a test is due

Administrator access required.

Authentication: API key. Permission: maintenance.

Responses

Field definitions: BackupRestoreVerificationResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BackupRestoreVerificationResponseDto"
        }
      }
    },
    "description": ""
  }
}

Record a backup restore test

POST /api/admin/database-backups/restore-verification

Records that restoring the database, the original files or both was proved just now

Administrator access required.

Authentication: API key. Permission: maintenance.

Request body

Required.

Field definitions: BackupRestoreVerificationRecordDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/BackupRestoreVerificationRecordDto"
    }
  }
}

Responses

Field definitions: BackupRestoreVerificationResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BackupRestoreVerificationResponseDto"
        }
      }
    },
    "description": ""
  }
}

Start database backup restore flow

POST /api/admin/database-backups/start-restore

Put Frameleaf into maintenance mode to restore a backup (Frameleaf must not be configured)

Authentication: No API key required. Permission: Public.

Responses

{
  "201": {
    "description": ""
  }
}

Upload database backup

POST /api/admin/database-backups/upload

Uploads .sql/.sql.gz file to restore backup from

Administrator access required.

Authentication: API key. Permission: backup.upload.

Request body

Required. Backup Upload

Field definitions: DatabaseBackupUploadDto

{
  "multipart/form-data": {
    "schema": {
      "$ref": "#/components/schemas/DatabaseBackupUploadDto"
    }
  }
}

Responses

{
  "201": {
    "description": ""
  }
}

Download database backup

GET /api/admin/database-backups/{filename}

Downloads the database backup file

Administrator access required.

Authentication: API key. Permission: backup.download.

Parameters

NameWhereRequiredDescription
filenamepathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "filename",
    "required": true,
    "in": "path",
    "schema": {
      "pattern": "^[a-zA-Z0-9_\\-.]+$",
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "content": {
      "application/octet-stream": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "description": ""
  }
}