Skip to main content
PATCH
/
devices
/
{device_id}
Python
from miru_server_sdk import Miru

client = Miru(
    api_key="My API Key",
)
device = client.devices.update(
    device_id="dvc_123",
)
print(device.id)
{
  "object": "device",
  "id": "dvc_123",
  "name": "My Device",
  "status": "inactive",
  "last_connected_at": "2021-01-01T00:00:00Z",
  "last_disconnected_at": "2021-01-01T00:00:00Z",
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z"
}

Authorizations

X-API-Key
string
header
required

The API key to use for authentication. Retrieve your API key from the Miru dashboard.

Path Parameters

device_id
string
required

The unique identifier of the device.

Example:

"dvc_123"

Body

application/json
name
string

The new name of the device. If excluded from the request, the device name is not updated.

Example:

"Robot 1"

Response

200 - application/json

Successfully updated the device.

object
enum<string>
required
Available options:
device
Example:

"device"

id
string
required

ID of the device.

Example:

"dvc_123"

name
string
required

Name of the device.

Example:

"My Device"

status
enum<string>
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.)
Available options:
inactive,
activating,
online,
offline
last_connected_at
string<date-time> | null
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).

Example:

"2021-01-01T00:00:00Z"

last_disconnected_at
string<date-time> | null
required

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

Example:

"2021-01-01T00:00:00Z"

created_at
string<date-time>
required

Timestamp of when the device was created.

Example:

"2021-01-01T00:00:00Z"

updated_at
string<date-time>
required

Timestamp of when the device was last updated.

Example:

"2021-01-01T00:00:00Z"

I