Skip to main content

Restore a project backup's path

POST/v2/project-backups/{projectBackupId}/restore-path
API version
v2
Request method
POST
Operation ID
backup-request-project-backup-restore-path-deprecated

Request​

  • projectBackupIdstringrequired

    ID of the ProjectBackup to restore the path.

Responses​

No response content specified.

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-d '{"clearTargetPath":true,"sourcePath":"/html/mainApp/config/","targetPath":"/html/mainApp"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/project-backups/string/restore-path
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.requestProjectBackupRestorePathDeprecated({
"projectBackupId": "string",
"data": {
"clearTargetPath": true,
"sourcePath": "/html/mainApp/config/",
"targetPath": "/html/mainApp"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Backup\RequestProjectBackupRestorePathDeprecated\RequestProjectBackupRestorePathDeprecatedRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Backup\RequestProjectBackupRestorePathDeprecated\RequestProjectBackupRestorePathDeprecatedRequestBody;

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

// TODO: Please consult the properties and constructor signature of
// RequestProjectBackupRestorePathDeprecatedRequestBody to learn how to construct a valid instance
$body = new RequestProjectBackupRestorePathDeprecatedRequestBody(/* TODO: ... */);

$request = (new RequestProjectBackupRestorePathDeprecatedRequest(
projectBackupId: "string",
body: $body
));
$response = $client->backup()->requestProjectBackupRestorePathDeprecated($request);

var_dump($response->getBody();

On this page