Skip to main content

Change the version of a system software via the mStudio API

Prerequisites

This article assumes that you have already created an app installation and that you have the ID of that app installation. You can also use the GET/v2/app-installations/{appInstallationId}/ endpoint to inspect the current configuration of said app installation. Relevant for this article is the .systemSoftware property, which is a map that contains the ID of the system software (as key) and the version that is currently installed.

Determine the system software and version IDs

First, you need to determine the IDs of the system software and the version you want to change to. You can do this by calling the GET/v2/system-softwares/ endpoint and filtering the result set by the desired .name property.

Using that ID, you can then call the GET/v2/system-software/{systemSoftwareId}/versions/ endpoint to get a list of all available versions for that system software. To only select specific versions, you can use the versionRange query parameter. This parameter accepts any valid semantic versioning constraint, like >= 14.0.0 or ^14.0.0.

Changing the system software version

To change the system software version, use the PATCH/v2/app-installations/{appInstallationId}/ endpoint. You only need to provide the .systemSoftware property in the request body, which should contain the ID of the system software and the version you want to change to:

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

{
"systemSoftware": {
"<insert system software id>": {
"systemSoftwareVersion": "<insert system software version id>",
"updatePolicy": "patchLevel"
}
}
}