Devices

Create

Create a new device.

post/devices

Request

  • Base URL
    https://api.mirurobotics.com/beta
  • URL
    https://api.mirurobotics.com/beta/devices
  • Auth
    API key in header X-API-Key

Query parameters

expandDeviceExpansion[]

Fields to expand on the device resource.

[
  "current_release"
]

Request body

namestring required

The name of the device.

Example request

{
  "name": "Robot 1"
}

Response

Successfully created the device.

object'device' required

The object type, which is always device.

idstring required

ID of the device.

namestring required

Name of the device.

descriptionstring nullable required

A free-form description of the device.

status'inactive' | 'activating' | 'online' | 'offline' | 'archived' required

The status of the device.

  • Inactive: The miru agent has not yet been installed / authenticated
  • Activating: The miru agent is currently being installed / authenticated (should only last for a few seconds)
  • Online: The miru agent has successfully pinged the server within the last 60 seconds.
  • Offline: The miru agent has not successfully pinged the server within the last 60 seconds (e.g. network issues, device is powered off, etc.)
  • Archived: The device has been archived. The agent's session has been revoked and the device no longer participates in workspace operations. See archived_at for when this occurred.
agent_versionstring nullable required

The version of the agent the device is running.

os'linux' | 'windows' required

An operating system family, from the agent's build-time OS vocabulary. Shared across resources (devices, config schemas, file rules, releases). This is the machine-readable OS kind, distinct from a human-readable version string.

  • linux
  • windows
hostnamestring nullable required

The hostname of the device as reported by the agent.

arch'x86_64' | 'aarch64' required

A CPU architecture, from the agent's build-time architecture vocabulary. Shared across resources (devices, config schemas, file rules). These are the canonical wire values.

  • x86_64
  • aarch64
os_versionstring nullable required

The human-readable long operating system version string reported by the agent (for example Ubuntu 22.04 or Windows 11 Pro). Distinct from the machine-readable os family.

kernel_versionstring nullable required

The operating system kernel version string reported by the agent.

last_connected_atstring date-time nullable required

Timestamp of when the device was last made an initial connection (this is not the same as the last time the device was seen).

last_disconnected_atstring date-time nullable required

Timestamp of when the device was last disconnected (this is not the same as the last time the device was seen).

created_atstring date-time required

Timestamp of when the device was created.

updated_atstring date-time required

Timestamp of when the device was last updated.

group_idstring nullable required

ID of the group this device belongs to. Null if the device is unassigned.

Example response

{
  "object": "device",
  "id": "dvc_123",
  "name": "My Device",
  "description": "Welder on line 3",
  "status": "online",
  "agent_version": "v1.0.0",
  "os": "linux",
  "hostname": "robot-1.local",
  "arch": "x86_64",
  "os_version": "Ubuntu 22.04",
  "kernel_version": "5.15.0-91-generic",
  "last_connected_at": "2021-01-01T00:00:00Z",
  "last_disconnected_at": null,
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z",
  "group_id": "grp_123"
}

Changes

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