from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
device = client.devices.create(
name="Robot 1",
)
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"
}Create a new device.
from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
device = client.devices.create(
name="Robot 1",
)
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"
}The API key to use for authentication. Retrieve your API key from the Miru dashboard.
The name of the device.
"Robot 1"
Successfully created the device.
device "device"
ID of the device.
"dvc_123"
Name of the device.
"My Device"
The status of the device.
inactive, activating, online, offline Timestamp of when the device was last made an initial connection (this is not the same as the last time the device was seen).
"2021-01-01T00:00:00Z"
Timestamp of when the device was last disconnected (this is not the same as the last time the device was seen).
"2021-01-01T00:00:00Z"
Timestamp of when the device was created.
"2021-01-01T00:00:00Z"
Timestamp of when the device was last updated.
"2021-01-01T00:00:00Z"