Skip to content

Re-deploy a deployment with a new version and parameters

POST
/api/v1/deployments/{id}/redeploy
curl --request POST \
--url http://localhost:3000/api/v1/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/redeploy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "applicationDescriptionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parameterOverrides": {} }'

Moves the deployment to a new revision (application version and the complete set of parameter overrides) in place. The deployment id, the instance ids and the Margo ApplicationDeployment ids stay the same, so a device sees the same id with a new digest and updates without an uninstall. Allowed while the deployment is PENDING, INSTALLING, INSTALLED or FAILED, or its rollout was rolled back; refused (409) during a staged rollout and for removed deployments. A deployment group (multi-profile create) moves together in one transaction. The target version must belong to the same application, must not be retired or without a source registry, must declare every deployment profile in use and must be servable under Margo rc2. Parameters are validated like on create, and an immutable parameter of an installed application cannot change. A request that equals the current revision is refused (409). To re-deploy a single device, split it off first (POST /deployments/{id}/targets/split), then re-deploy the new deployment; PUT /deployments/{id}/devices/{deviceId} does not change the version.

id
required
string format: uuid

Deployment UUID

x-organization-id
string format: uuid

UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.

Media typeapplication/json
object
applicationDescriptionId
required

Target application version (ApplicationDescription id) of the same application

string format: uuid
parameterOverrides
required

The complete set of parameter overrides of the new revision (full replacement)

object
key
additional properties
any
Examplegenerated
{
"applicationDescriptionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"parameterOverrides": {}
}

Deployment moved to a new revision

Media typeapplication/json
object
id
required

The deployment that was re-deployed (unchanged)

string format: uuid
name
required
string
fromRevision
required
object
id
required
object
revision
required

Monotonic revision number of the deployment

object
applicationDescriptionId
required
string format: uuid
version
required

Application version string

string
parameterDigest
required

Sha256 of the canonical JSON of the parameter overrides

string
toRevision
required
object
id
required
object
revision
required

Monotonic revision number of the deployment

object
applicationDescriptionId
required
string format: uuid
version
required

Application version string

string
parameterDigest
required

Sha256 of the canonical JSON of the parameter overrides

string
deploymentIds
required

Every deployment that moved in the same transaction (the deployment group)

Array<string>
resetInstances
required

Number of device instances reset to PENDING

number
released
required

True when the new revision was released to the devices at once (IMMEDIATE strategy). A staged strategy releases it batch by batch.

boolean
deploymentGroupId

FM-1514: the deployment group, when the re-deploy addressed the group

string format: uuid
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"fromRevision": {
"id": {},
"revision": {},
"applicationDescriptionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"version": "example",
"parameterDigest": "example"
},
"toRevision": {
"id": {},
"revision": {},
"applicationDescriptionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"version": "example",
"parameterDigest": "example"
},
"deploymentIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"resetInstances": 1,
"released": true,
"deploymentGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Unknown or missing body field, or parameter overrides that violate the application (PARAMETER_VALIDATION_FAILED, IMMUTABLE_PARAMETER_CHANGED)

Forbidden — caller lacks required permission

Deployment or target version not found in the caller organization

State does not allow a re-deploy, version retired or without source, identical content, retired parameter shape, or a concurrent change (code field)

Target version of another application, a profile in use is missing, or rc2 admission would drop the revision (code field)