Skip to main content

Replace a MySQL Database with another MySQL Database

PATCH/v2/app-installations/{appInstallationId}/database/replace
API version
v2
Request method
PATCH
Operation ID
deprecated-app-replace-database

Request​

  • appInstallationIdstringrequired

    The ID of the appinstallation you want the database to be replaced for.

Responses​

No response content specified.

Usage examples​

$ curl \
--fail \
--location \
-X PATCH \
-d '{"databaseUserIds":{"string":"string"},"newDatabaseId":"f0f86186-0a5a-45b2-aa33-502777496347","oldDatabaseId":"f0f86186-0a5a-45b2-aa33-502777496347"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/app-installations/string/database/replace
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.app.deprecatedAppReplaceDatabase({
"appInstallationId": "string",
"data": {
"databaseUserIds": {
"string": "string"
},
"newDatabaseId": "f0f86186-0a5a-45b2-aa33-502777496347",
"oldDatabaseId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\App\DeprecatedAppReplaceDatabase\DeprecatedAppReplaceDatabaseRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\App\DeprecatedAppReplaceDatabase\DeprecatedAppReplaceDatabaseRequestBody;

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

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

$request = (new DeprecatedAppReplaceDatabaseRequest(
appInstallationId: "string",
body: $body
));
$response = $client->app()->deprecatedAppReplaceDatabase($request);

var_dump($response->getBody();

On this page