Request an app installation
POST/projects/ {projectId}/ app-installations/
This API operation requests a new app installation.
Usage notes
Determining the appVersionId
Both the app that should be installed and the specific version are identified by the appVersionId
body parameter.
To determine available apps, use the GET/
API operation. To determine available versions for a given app, use the app ID (as returned by the app-list-apps
operation) as input parameter for the GET/
operation.
On user inputs
Pay attention to the userInputs
parameter in the request body. This parameter is a list of objects, each with a name
and value
property.
The allowed values for name
are dependent on the app version being installed. To determine the required inputs for a given app version, inspect the userInputs
property of the app version object returned by the GET/
operation.
Determining when the installation is complete
Note that this operation does not block until the installation is complete. To determine the status of the installation, use the GET/
operation. When the operation is complete, the .appVersion.current
property will be equal to .appVersion.desired
.
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
- mw CLI
$ curl \
--fail \
--location \
-X POST \
-d '{"appVersionId":"f0f86186-0a5a-45b2-aa33-502777496347","description":"string","updatePolicy":"none","userInputs":[{"name":"string","value":"string"}]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/projects/f0f86186-0a5a-45b2-aa33-502777496347/app-installations
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.requestAppinstallation({
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": {
"appVersionId": "f0f86186-0a5a-45b2-aa33-502777496347",
"description": "string",
"updatePolicy": "none",
"userInputs": [
{
"name": "string",
"value": "string"
}
]
}
});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\App\RequestAppinstallation\RequestAppinstallationRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\App\RequestAppinstallation\RequestAppinstallationRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// RequestAppinstallationRequestBody to learn how to construct a valid instance
$body = new RequestAppinstallationRequestBody(/* TODO: ... */);
$request = (new RequestAppinstallationRequest(
projectId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->app()->requestAppinstallation($request);
var_dump($response->getBody();
$ mw app create php \
--project-id $PROJECT_ID \
--site-title "My TYPO3 site"
$ mw app install typo3 \
--version 12.4.16 \
--install-mode composer \
--project-id $PROJECT_ID \
--admin-email admin@typo3.example \
--admin-pass securepassword \
--admin-user admin \
--site-title "My TYPO3 site"