Restore a project backup's path
POST/project-backups/ {projectBackupId}/ restore-path/
v2
POST
backup-request-project-backup-restore-path
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ 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.requestProjectBackupRestorePath({
"projectBackupId": "string",
"data": {
"clearTargetPath": true,
"sourcePath": "/html/mainApp/config/",
"targetPath": "/html/mainApp"
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Backup\RequestProjectBackupRestorePath\RequestProjectBackupRestorePathRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Backup\RequestProjectBackupRestorePath\RequestProjectBackupRestorePathRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// RequestProjectBackupRestorePathRequestBody to learn how to construct a valid instance
$body = new RequestProjectBackupRestorePathRequestBody(/* TODO: ... */);
$request = (new RequestProjectBackupRestorePathRequest(
projectBackupId: "string",
body: $body
));
$response = $client->backup()->requestProjectBackupRestorePath($request);
var_dump($response->getBody();