from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
devices = client.devices.list()
print(devices){
"object": "list",
"total_count": 123,
"limit": 10,
"offset": 0,
"has_more": false,
"data": [
{
"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"
}
]
}List devices.
from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
devices = client.devices.list()
print(devices){
"object": "list",
"total_count": 123,
"limit": 10,
"offset": 0,
"has_more": false,
"data": [
{
"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 offset of the items to return. An offset of 10 with a limit of 10 returns items 11-20.
x >= 0The maximum number of items to return. A limit of 15 with an offset of 0 returns items 1-15.
1 <= x <= 100The order to sort the devices.
id:asc, id:desc, created_at:desc, created_at:asc The fields to expand in the device list.
total_count The device ID to filter by.
"dev_123"
The device name to filter by.
"My Device"
The agent version to filter by.
"v1.0.0"
The current release ID to filter by.
"rls_123"
Successfully listed the devices.
list "list"
The total number of items in the list. By default the total count is not returned. The total count must be expanded (using expand[]=total_count) to get the total number of items in the list.
The maximum number of items to return. A limit of 15 with an offset of 0 returns items 1-15.
1 <= x <= 100The offset of the items to return. An offset of 10 with a limit of 10 returns items 11-20.
x >= 0True if there are more items in the list to return. False if there are no more items to return.
false
Hide child attributes
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"