Re-deploy a deployment with a new version and parameters
const url = 'http://localhost:3000/api/v1/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/redeploy';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"applicationDescriptionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","parameterOverrides":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Deployment UUID
Header Parameters
Section titled “Header Parameters”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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Target application version (ApplicationDescription id) of the same application
The complete set of parameter overrides of the new revision (full replacement)
object
Examplegenerated
{ "applicationDescriptionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parameterOverrides": {}}Responses
Section titled “Responses”Deployment moved to a new revision
object
The deployment that was re-deployed (unchanged)
object
object
Monotonic revision number of the deployment
object
Application version string
Sha256 of the canonical JSON of the parameter overrides
object
object
Monotonic revision number of the deployment
object
Application version string
Sha256 of the canonical JSON of the parameter overrides
Every deployment that moved in the same transaction (the deployment group)
Number of device instances reset to PENDING
True when the new revision was released to the devices at once (IMMEDIATE strategy). A staged strategy releases it batch by batch.
FM-1514: the deployment group, when the re-deploy addressed the group
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)