Skip to main content

Get a project backup

GET/v2/project-backups/{projectBackupId}
API version
v2
Request method
GET
Operation ID
backup-get-project-backup

Request​

  • projectBackupIdstringrequired

    ID of the ProjectBackup to retrieve.

Responses​

Format
application/json
Description

OK

  • createdAtstring (date-time)
  • deletablebooleanrequired
  • descriptionstring
  • expiresAtstring (date-time)
  • exportobject
    • downloadURLstring (url)
    • expiresAtstring (date-time)
    • formatstringrequired
    • phasestring (one of: Pending, Exporting, Failed, Completed, Expired)
    • sha256Checksumstring
    • withPasswordbooleanrequired
  • idstring (uuid)required
  • parentIdstring (uuid)
  • projectIdstring (uuid)required
  • requestedAtstring (date-time)required
  • restoreobject
    • databaseRestoresarray of object
      • Array[
        • *object
          • databaseBackupDumpstringrequired
          • targetDatabaseIdstring (uuid)required
        ]
    • pathRestoreobject
      • clearTargetPathbooleanrequired
      • determinedTargetPathstringrequired
      • sourcePathsarray of stringrequired
        • Array[
          • *string
          ]
      • targetRestorePathstring
    • phasestring (one of: running, completed)required
  • restorePathobject
    • clearTargetPathbooleanrequired
    • determinedTargetPathstringrequired
    • phasestring (one of: running, completed)required
    • sourcePathstringrequired
    • targetPathstring
  • statusstringrequired
Content-Type: application/json

{
"createdAt": "1985-10-26T01:21:00.000Z",
"deletable": true,
"description": "I'm a ProjectBackup",
"expiresAt": "1985-10-26T01:21:00.000Z",
"export": {
"downloadURL": "string",
"expiresAt": "1985-10-26T01:21:00.000Z",
"format": "tar",
"phase": "Completed",
"sha256Checksum": "string",
"withPassword": true
},
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"parentId": "f0f86186-0a5a-45b2-aa33-502777496347",
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"requestedAt": "1985-10-26T01:21:00.000Z",
"restore": {
"databaseRestores": [
{
"databaseBackupDump": "string",
"targetDatabaseId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
],
"pathRestore": {
"clearTargetPath": true,
"determinedTargetPath": "string",
"sourcePaths": [
"string"
],
"targetRestorePath": "string"
},
"phase": "running"
},
"restorePath": {
"clearTargetPath": true,
"determinedTargetPath": "string",
"phase": "running",
"sourcePath": "string",
"targetPath": "string"
},
"status": "Completed"
}
{
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"deletable": {
"type": "boolean"
},
"description": {
"example": "I'm a ProjectBackup",
"type": "string"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"export": {
"properties": {
"downloadURL": {
"format": "url",
"type": "string"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"format": {
"example": "tar",
"type": "string"
},
"phase": {
"enum": [
"Pending",
"Exporting",
"Failed",
"Completed",
"Expired"
],
"example": "Completed",
"type": "string"
},
"sha256Checksum": {
"type": "string"
},
"withPassword": {
"type": "boolean"
}
},
"required": [
"format",
"withPassword"
],
"type": "object"
},
"id": {
"format": "uuid",
"type": "string"
},
"parentId": {
"format": "uuid",
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"requestedAt": {
"format": "date-time",
"type": "string"
},
"restore": {
"properties": {
"databaseRestores": {
"items": {
"properties": {
"databaseBackupDump": {
"type": "string"
},
"targetDatabaseId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"databaseBackupDump",
"targetDatabaseId"
],
"type": "object"
},
"type": "array"
},
"pathRestore": {
"properties": {
"clearTargetPath": {
"default": false,
"type": "boolean"
},
"determinedTargetPath": {
"type": "string"
},
"sourcePaths": {
"items": {
"type": "string"
},
"type": "array"
},
"targetRestorePath": {
"type": "string"
}
},
"required": [
"sourcePaths",
"determinedTargetPath",
"clearTargetPath"
],
"type": "object"
},
"phase": {
"enum": [
"running",
"completed"
],
"type": "string"
}
},
"required": [
"phase"
],
"type": "object"
},
"restorePath": {
"properties": {
"clearTargetPath": {
"default": false,
"type": "boolean"
},
"determinedTargetPath": {
"type": "string"
},
"phase": {
"enum": [
"running",
"completed"
],
"type": "string"
},
"sourcePath": {
"type": "string"
},
"targetPath": {
"type": "string"
}
},
"required": [
"phase",
"sourcePath",
"determinedTargetPath",
"clearTargetPath"
],
"type": "object"
},
"status": {
"example": "Completed",
"type": "string"
}
},
"required": [
"id",
"projectId",
"status",
"deletable",
"requestedAt"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/project-backups/string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.backup.getProjectBackup({
"projectBackupId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Backup\GetProjectBackup\GetProjectBackupRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new GetProjectBackupRequest(
projectBackupId: "string"
));
$response = $client->backup()->getProjectBackup($request);

var_dump($response->getBody();

On this page