> ## 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

> Retrieve the device.



## OpenAPI

````yaml /references/device-api/v0.3.0/api.yaml get /device
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. On Linux the agent serves it over the Unix socket
    `/run/miru/miru.sock` with no authentication. Over loopback TCP, which is on
    by default on Windows at `127.0.0.1:6478`, every route requires
    `Authorization: Bearer <token>`. Clients read the port and token from the
    agent's discovery file, `%ProgramData%\Miru\device-api\device-api.json` on
    Windows; the token changes every time the agent starts.
  version: v0.3
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-release-version: v0.3.0
  x-git-commit:
    sha: 13ce9431f6c8183218bb62bcfe1d025852c08de6
    url: >-
      https://github.com/mirurobotics/openapi/commit/13ce9431f6c8183218bb62bcfe1d025852c08de6
    message: 'chore(device): bump the Device API version (#518)'
    author: Ben's Agent
    branch: HEAD
    dirty: false
  x-build:
    built_at: '2026-11-17T04:03:13.976979+00:00'
servers:
  - url: http://localhost/v0.3
    description: localhost
security:
  - {}
  - BearerAuth: []
paths:
  /device:
    get:
      tags:
        - Device
      summary: Get
      description: Retrieve the device.
      operationId: getDevice
      responses:
        '200':
          description: Successfully retrieved the device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device'
      x-codeSamples:
        - lang: curl
          label: curl (Linux)
          source: |-
            curl \
              --unix-socket /run/miru/miru.sock \
              --request GET \
              --url http://localhost/v0.3/device
        - lang: powershell
          label: PowerShell (Windows)
          source: >-
            $api = Get-Content -Raw
            "$env:ProgramData\Miru\device-api\device-api.json" |
            ConvertFrom-Json; `

            Invoke-RestMethod -Method Get `
              -Uri "http://127.0.0.1:$($api.port)/v0.3/device" `
              -Headers @{ Authorization = "Bearer $($api.token)" }
        - lang: Python
          source: |-
            from miru_device_sdk import Miru

            client = Miru()
            device = client.device.retrieve()
            print(device.id)
components:
  schemas:
    Device:
      title: Device
      type: object
      required:
        - object
        - id
        - name
        - status
        - last_synced_secs_ago
        - last_connected_secs_ago
        - last_disconnected_secs_ago
      properties:
        object:
          type: string
          enum:
            - device
          example: device
          x-stainless-const: true
          description: The object type, which is always `device`.
        id:
          type: string
          example: dvc_123
          description: ID of the device.
        name:
          type: string
          example: My Device
          description: Name of the device.
        status:
          $ref: '#/components/schemas/DeviceStatus'
        last_synced_secs_ago:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          example: 42
          description: >-
            Seconds since the device last synced, as measured by the agent when
            it built this response, or null if it hasn't synced since the agent
            last started.
        last_connected_secs_ago:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          example: 3600
          description: >-
            Seconds since the device last connected to the backend, as measured
            by the agent when it built this response, or null if it hasn't
            connected since the agent last started.
        last_disconnected_secs_ago:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          example: 3605
          description: >-
            Seconds since the device last disconnected from the backend, as
            measured by the agent when it built this response, or null if it
            hasn't disconnected since the agent last started.
      example:
        object: device
        id: dvc_123
        name: My Device
        status: online
        last_synced_secs_ago: 42
        last_connected_secs_ago: 3600
        last_disconnected_secs_ago: 3605
    DeviceStatus:
      type: string
      description: >
        The status of the device.

        - Online: The miru agent is connected

        - Offline: The miru agent is disconnected (e.g. network issues, device
        is powered off, etc.)
      enum:
        - online
        - offline
      x-enum-varnames:
        - DEVICE_STATUS_ONLINE
        - DEVICE_STATUS_OFFLINE
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The token from the agent's discovery file
        (`%ProgramData%\Miru\device-api\device-api.json` on Windows). Required
        over loopback TCP (`127.0.0.1:6478` by default on Windows) and accepted
        by every route; not used over the Unix socket.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.