Deployments

Deploy

Trigger a deployment to its target device.

post/deployments/{deployment_id}/deploy

Request

  • Base URL
    https://api.mirurobotics.com/beta
  • URL
    https://api.mirurobotics.com/beta/deployments/{deployment_id}/deploy
  • Auth
    API key in header X-API-Key

Path parameters

deployment_idstring required
Example:dpl_123

The unique identifier of the deployment.

Query parameters

expandDeploymentExpansion[]

Fields to expand on the deployment resource.

[
  "device"
]

Response

Successfully triggered the deployment.

object'deployment' required

The object type, which is always deployment.

idstring required

ID of the deployment.

descriptionstring required

The description of the deployment.

status'drifted' | 'staged' | 'queued' | 'deployed' | 'removing' | 'archived' | 'failed' | 'retrying' required

This status merges the 'activity_status' and 'error_status' fields, with error states taking precedence over activity states when errors are present. For example, if the activity status is 'deployed' but the error status is 'failed', the status is 'failed'. However, if the error status is 'none' and the activity status is 'deployed', the status is 'deployed'.

activity_status'drifted' | 'staged' | 'queued' | 'deployed' | 'removing' | 'archived' required

Last known activity state of the deployment.

drifted means the device's configurations have drifted since this deployment was staged, and the deployment needs to be reviewed before it can be deployed.

staged means the deployment is ready to be deployed.

queued means the deployment's config instances are waiting to be received by the device and will be deployed as soon as the device is online.

deployed means the deployment's config instances are currently available for consumption on the device.

removing means the deployment's config instances are being removed from the device.

archived means the deployment is available for historical reference but cannot be deployed and is not active on the device.

error_status'none' | 'failed' | 'retrying' required

Last known error state of the deployment.

none means there are no errors.

retrying means an error has been encountered and the agent is retrying to reach the target status.

failed means a fatal error has been encountered; the deployment is archived and, if deployed, removed from the device.

target_status'staged' | 'deployed' | 'archived' required

Desired state of the deployment.

staged means the deployment is ready to be deployed.

deployed means all config instances in the deployment are available for consumption on the device.

archived means the deployment is available for historical reference but cannot be deployed and is not active on the device.

device_idstring required

ID of the device.

release_idstring required

ID of the release.

created_atstring date-time required

Timestamp of when the deployment was created.

updated_atstring date-time required

Timestamp of when the deployment was last updated.

parent_idstring nullable required

ID of the deployment that this deployment was patched from. Null if this deployment has no parent.

queued_atstring date-time nullable required

Timestamp of when a principal last queued the deployment, i.e. requested that it be deployed to its device. Device status reports do not change it.

deployed_atstring date-time nullable required

Timestamp of the last time the device's agent confirmed that the deployment was deployed. Set by the agent. A watermark of the latest transition; it is not cleared when the deployment later changes state.

archived_atstring date-time nullable required

Timestamp of the last time the device's agent confirmed that the deployment was archived. Set by the agent. A watermark of the latest transition; it is not cleared when the deployment later changes state.

parentDeployment circular

Example response

{
  "object": "deployment",
  "id": "dpl_123",
  "description": "Deployment for the motion control config instance",
  "status": "staged",
  "activity_status": "staged",
  "error_status": "none",
  "target_status": "staged",
  "device_id": "dvc_123",
  "release_id": "rls_123",
  "parent_id": null,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "queued_at": null,
  "deployed_at": null,
  "archived_at": null
}

Changes

No recorded changes to this operation across all 1 revision of this API.