Zum Hauptinhalt springen

Update properties belonging to an app installation

PATCH/app-installations/{appInstallationId}/
v2
PATCH
app-patch-appinstallation

This API operation can be used to modify an existing app installation. This includes the following changes:

  • Changing the app version
  • Changing the system software dependencies (like PHP and other system components)
  • Changing the configuration parameters (userInputs)

Usage notes

Determining possible update candidates for appVersionId

When performing a version upgrade, the target version is identified by the appVersionId body parameter.

To determine the app ID of an existing app installation, use the GET/v2/app-installations/{appInstallationId}/ operation. The response of this operation contains the appId and appVersion.current properties which contain the relevant IDs.

Using the app ID, you can use the GET/v2/apps/{appId}/versions/{baseAppVersionId}/update-candidates/ operation to determine possible versions that you can upgrade to.

Determining possible system softwares

When changing the system software dependencies of an app installation, you can use the GET/v2/system-softwares/ operation to determine the possible system software dependencies that you can set.

You can also use the GET/v2/apps/{appId}/versions/{appVersionId}/ operation to determine the system software dependencies of a specific app version. The response of this operation contains a .systemSoftwareDependencies property which contains the relevant system software IDs, along with a semantic version range of compatible versions.

Removing system software dependencies

Due to the semantics of the HTTP PATCH request, omitting a system software entirely from the request body will mean "leave unchanged". To explicitly uninstall a system software dependency, explicitly set it to null:

PATCH /v2/app-installations/{appInstallationId} HTTP/1.1
Host: api.mittwald.de
Content-Type: application/json

{
"systemSoftware": {
"34220303-cb87-4592-8a95-2eb20a97b2ac": null
}
}

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 unknown operation app-list-appversion operation.

Request

  • appInstallationIdstring (uuid)
    required

Responses

Kein Request-Inhalt spezifiziert.

Usage examples

$ curl \
--fail \
--location \
-X PATCH \
-d '{"appVersionId":"f0f86186-0a5a-45b2-aa33-502777496347","customDocumentRoot":"string","description":"string","systemSoftware":{"string":{"systemSoftwareVersion":"string","updatePolicy":"none"}},"updatePolicy":"none","userInputs":[{"name":"string","value":"string"}]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/app-installations/f0f86186-0a5a-45b2-aa33-502777496347