Relocate an external Project to mittwald
POST/relocation/
v2
POST
relocation-create-relocation
Give mittwald access to your Provider and let them move your Project to mittwald.
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{"additionalServices":{"dataCompare":"default"},"allDomains":true,"allowPasswordChange":true,"articleType":"cms-hosting","contact":{"email":"email@mittwald.example","firstName":"string","lastName":"string","phoneNumber":"string"},"domains":[{"authCode":"string","domainOwnerData":"string","name":"string"}],"notes":"string","prices":{"positions":[{"name":"string","price":123}],"total":123},"provider":{"loginUrl":"string","name":"string","password":"string","sourceAccount":"string","userName":"string"},"target":{"organisation":"string","product":"string","projectName":"string","system":"kc"},"userId":"f0f86186-0a5a-45b2-aa33-502777496347"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/relocation
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.relocation.createRelocation({
"data": {
"additionalServices": {
"dataCompare": "default"
},
"allDomains": true,
"allowPasswordChange": true,
"articleType": "cms-hosting",
"contact": {
"email": "email@mittwald.example",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string"
},
"domains": [
{
"authCode": "string",
"domainOwnerData": "string",
"name": "string"
}
],
"notes": "string",
"prices": {
"positions": [
{
"name": "string",
"price": 123
}
],
"total": 123
},
"provider": {
"loginUrl": "string",
"name": "string",
"password": "string",
"sourceAccount": "string",
"userName": "string"
},
"target": {
"organisation": "string",
"product": "string",
"projectName": "string",
"system": "kc"
},
"userId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Relocation\CreateRelocation\CreateRelocationRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Relocation\CreateRelocation\CreateRelocationRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// CreateRelocationRequestBody to learn how to construct a valid instance
$body = new CreateRelocationRequestBody(/* TODO: ... */);
$request = (new CreateRelocationRequest(
body: $body
));
$response = $client->relocation()->createRelocation($request);
var_dump($response->getBody();