Set the desired machine version for an existing instance.
The instance will not be upgraded immediately but will be upgraded the next time an event is sent to it from a settled state.
A 400 with code "no-migration-path" will be returned if there is no path through the set of existing migrations from the current instance version to the desired instance version.
Path parameters
-
The slug/name for the machine definition.
Minimum length is
1. Format should match the following pattern:^[a-zA-Z0-9_-]{1,128}$. -
The slug/name for the machine instance.
Minimum length is
1. Format should match the following pattern:^[a-zA-Z0-9_-]{1,128}$.
PUT
/machines/{machineSlug}/i/{instanceSlug}/v
curl \
-X PUT https://api.statebacked.dev/machines/my-machine/i/user-1234/v \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"targetMachineVersionId":"string"}'
Request example
{
"targetMachineVersionId": "string"
}
Request examples
{
"targetMachineVersionId": "string"
}
Response examples (400)
{
"error": "string",
"code": "specify-org",
"parameter": "string"
}
Response examples (400)
{
"error": "string",
"code": "specify-org",
"parameter": "string"
}
Response examples (403)
{
"error": "string",
"code": "missing-scope"
}
Response examples (403)
{
"error": "string",
"code": "missing-scope"
}