> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirurobotics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current

> Get the current deployment for the device.



## OpenAPI

````yaml /references/device-api/v0.2.0.yaml get /deployments/current
openapi: 3.0.3
info:
  title: Miru Agent API
  description: >-
    The API between the Miru Agent and any external client living on the same
    device as the Miru Agent
  version: v0.2
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-release-version: v0.2.0
  x-git-commit:
    sha: 5e98bcf13136459371f57ae422d353a1e7491b14
    url: >-
      https://github.com/mirurobotics/openapi/commit/5e98bcf13136459371f57ae422d353a1e7491b14
    message: 'chore: bump device api version'
    author: Benjamin Smidt
    branch: HEAD
    dirty: false
  x-build:
    built_at: '2026-03-10T03:12:13.875623+00:00'
servers:
  - url: http://localhost/v0.2
    description: localhost
security: []
paths:
  /deployments/current:
    get:
      tags:
        - Deployments
      summary: Get Current
      description: Get the current deployment for the device.
      operationId: getCurrentDeployment
      responses:
        '200':
          description: Successfully retrieved the current deployment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --unix-socket /run/miru/miru.sock \
              --request GET \
              --url http://localhost/v0.2/deployments/current
        - lang: Python
          source: |-
            from miru_device_sdk import Miru

            client = Miru()
            deployment = client.deployments.current()
            print(deployment.id)
components:
  schemas:
    Deployment:
      title: Deployment
      type: object
      required:
        - object
        - id
        - description
        - status
        - activity_status
        - error_status
        - target_status
        - device_id
        - release_id
        - created_at
      properties:
        object:
          type: string
          enum:
            - deployment
          example: deployment
          x-stainless-const: true
          description: The object type, which is always `deployment`.
        id:
          type: string
          example: dpl_123
          description: ID of the deployment.
        description:
          type: string
          example: Deployment for the motion control config instance
          description: The description of the deployment.
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        activity_status:
          $ref: '#/components/schemas/DeploymentActivityStatus'
        error_status:
          $ref: '#/components/schemas/DeploymentErrorStatus'
        target_status:
          $ref: '#/components/schemas/DeploymentTargetStatus'
        device_id:
          type: string
          example: dvc_123
          description: ID of the device.
        release_id:
          type: string
          example: rls_123
          description: ID of the release.
        created_at:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00Z'
          description: Timestamp of when the device release was created.
      example:
        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
        created_at: '2024-01-01T00:00:00Z'
    DeploymentStatus:
      type: string
      description: >
        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'.
      enum:
        - drifted
        - staged
        - queued
        - deployed
        - archived
        - failed
        - retrying
      x-enum-varnames:
        - DEPLOYMENT_STATUS_DRIFTED
        - DEPLOYMENT_STATUS_STAGED
        - DEPLOYMENT_STATUS_QUEUED
        - DEPLOYMENT_STATUS_DEPLOYED
        - DEPLOYMENT_STATUS_ARCHIVED
        - DEPLOYMENT_STATUS_FAILED
        - DEPLOYMENT_STATUS_RETRYING
    DeploymentActivityStatus:
      type: string
      description: >
        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.


        `archived` means the deployment is available for historical reference
        but cannot be deployed and is not active on the device.
      enum:
        - drifted
        - staged
        - queued
        - deployed
        - archived
      x-enum-varnames:
        - DEPLOYMENT_ACTIVITY_STATUS_DRIFTED
        - DEPLOYMENT_ACTIVITY_STATUS_STAGED
        - DEPLOYMENT_ACTIVITY_STATUS_QUEUED
        - DEPLOYMENT_ACTIVITY_STATUS_DEPLOYED
        - DEPLOYMENT_ACTIVITY_STATUS_ARCHIVED
    DeploymentErrorStatus:
      type: string
      description: >
        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.
      enum:
        - none
        - failed
        - retrying
      x-enum-varnames:
        - DEPLOYMENT_ERROR_STATUS_NONE
        - DEPLOYMENT_ERROR_STATUS_FAILED
        - DEPLOYMENT_ERROR_STATUS_RETRYING
    DeploymentTargetStatus:
      type: string
      description: >
        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.
      enum:
        - staged
        - deployed
        - archived
      x-enum-varnames:
        - DEPLOYMENT_TARGET_STATUS_STAGED
        - DEPLOYMENT_TARGET_STATUS_DEPLOYED
        - DEPLOYMENT_TARGET_STATUS_ARCHIVED

````