Replace a MySQL Database with another MySQL Database
PATCH /v2/ app-installations/ {appInstallationId}/ database/ replace/
v2
PATCH
app-replace-database
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ 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/f0f86186-0a5a-45b2-aa33-502777496347/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.replaceDatabase({
"appInstallationId": "f0f86186-0a5a-45b2-aa33-502777496347",
"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\ReplaceDatabase\ReplaceDatabaseRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\App\ReplaceDatabase\ReplaceDatabaseRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// ReplaceDatabaseRequestBody to learn how to construct a valid instance
$body = new ReplaceDatabaseRequestBody(/* TODO: ... */);
$request = (new ReplaceDatabaseRequest(
appInstallationId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->app()->replaceDatabase($request);
var_dump($response->getBody();