from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
deployment = client.deployments.retrieve(
deployment_id="dpl_123",
)
print(deployment.id){
"object": "deployment",
"id": "dpl_123",
"description": "Deployment for the motion control config instance",
"status": "validating",
"activity_status": "validating",
"error_status": "none",
"target_status": "staged",
"device_id": "dvc_123",
"release_id": "v1.0.0",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"device": null,
"release": null,
"config_instances": [
{
"object": "config_instance",
"id": "cfg_inst_123",
"target_status": "created",
"activity_status": "created",
"error_status": "none",
"status": "created",
"relative_filepath": "/v1/motion-control.json",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"device_id": "dvc_123",
"config_schema_id": "cfg_sch_123",
"config_type_id": "cfg_type_123",
"device": null,
"config_schema": null,
"content": {
"enable_autonomy": true,
"enable_remote_control": false,
"max_payload_kg": 8.5,
"preferred_speed_mode": "normal",
"emergency_stop_sensitivity": 0.9,
"telemetry": {
"upload_interval_sec": 45,
"heartbeat_interval_sec": 15
}
},
"config_type": null
}
]
}from miru_server_sdk import Miru
client = Miru(
api_key="My API Key",
)
deployment = client.deployments.retrieve(
deployment_id="dpl_123",
)
print(deployment.id){
"object": "deployment",
"id": "dpl_123",
"description": "Deployment for the motion control config instance",
"status": "validating",
"activity_status": "validating",
"error_status": "none",
"target_status": "staged",
"device_id": "dvc_123",
"release_id": "v1.0.0",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"device": null,
"release": null,
"config_instances": [
{
"object": "config_instance",
"id": "cfg_inst_123",
"target_status": "created",
"activity_status": "created",
"error_status": "none",
"status": "created",
"relative_filepath": "/v1/motion-control.json",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"device_id": "dvc_123",
"config_schema_id": "cfg_sch_123",
"config_type_id": "cfg_type_123",
"device": null,
"config_schema": null,
"content": {
"enable_autonomy": true,
"enable_remote_control": false,
"max_payload_kg": 8.5,
"preferred_speed_mode": "normal",
"emergency_stop_sensitivity": 0.9,
"telemetry": {
"upload_interval_sec": 45,
"heartbeat_interval_sec": 15
}
},
"config_type": null
}
]
}The API key to use for authentication. Retrieve your API key from the Miru dashboard.
The unique identifier of the deployment.
"dpl_123"
The fields to expand in the deployment.
device, release, config_instances Successfully retrieved the deployment.
deployment "deployment"
ID of the deployment.
"dpl_123"
The description of the deployment.
"Deployment for the motion control config instance"
This status merges the 'activity_status' and 'error_status' fields, with error states taking precedence over activity states when errors are present. For example, if the activity status is 'deployed' but the error status is 'failed', the status is 'failed'. However, if the error status is 'none' and the activity status is 'deployed', the status is 'deployed'.
validating, needs_review, staged, queued, deployed, removing, archived, failed, retrying Last known activity state of the deployment.
validating, needs_review, staged, queued, deployed, removing, archived Last known error state of the deployment.
none, failed, retrying Desired state of the deployment.
staged, deployed, archived ID of the device.
"dvc_123"
The version of the release.
"v1.0.0"
Timestamp of when the device release was created.
"2024-01-01T00:00:00Z"
Timestamp of when the device release was last updated.
"2024-01-01T00:00:00Z"
Expand the device using 'expand[]=device' in the query string.
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"
null
Expand the release using 'expand[]=release' in the query string.
Hide child attributes
release "release"
ID of the release.
"rls_123"
The version of the release.
"v1.0.0"
Timestamp of when the release was created.
"2024-01-01T00:00:00Z"
Timestamp of when the release was last updated.
"2024-01-01T00:00:00Z"
Expand the config schemas using 'expand[]=config_schemas' in the query string.
Hide child attributes
config_schema "config_schema"
ID of the config schema.
"cfg_sch_123"
Config schema version for the config type.
2
Hash of the config schema contents.
"1234567890"
The file path to deploy the config instance relative to /srv/miru/config_instances. v1/motion-control.json would deploy to /srv/miru/config_instances/v1/motion-control.json.
"/v1/motion-control.json"
Timestamp of when the config schema was created.
"2021-01-01T00:00:00Z"
Timestamp of when the config schema was last updated.
"2021-01-01T00:00:00Z"
ID of the config type.
"cfg_typ_123"
The config schema's JSON Schema definition.
{
"title": "Robot Features",
"type": "object",
"properties": {
"enable_autonomy": { "type": "boolean", "default": true },
"enable_remote_control": { "type": "boolean", "default": true },
"max_payload_kg": {
"type": "number",
"minimum": 0,
"maximum": 99,
"default": 10
},
"preferred_speed_mode": {
"type": "string",
"enum": ["slow", "normal", "fast"],
"default": "normal"
},
"emergency_stop_sensitivity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.8
},
"telemetry": {
"type": "object",
"properties": {
"upload_interval_sec": {
"type": "integer",
"minimum": 10,
"maximum": 600,
"default": 60
},
"heartbeat_interval_sec": {
"type": "integer",
"minimum": 1,
"maximum": 60,
"default": 10
}
},
"required": [
"upload_interval_sec",
"heartbeat_interval_sec"
]
}
},
"required": [
"enable_autonomy",
"enable_remote_control",
"max_payload_kg",
"preferred_speed_mode",
"emergency_stop_sensitivity",
"telemetry"
]
}Expand the config type using 'expand[]=config_type' in the query string.
Hide child attributes
config_type "config_type"
ID of the config type.
"cfg_123"
Name of the config type.
"My Config Type"
An immutable, code-friendly name for the config type.
"my-config-type"
Timestamp of when the config type was created.
"2021-01-01T00:00:00Z"
Timestamp of when the config type was last updated.
"2021-01-01T00:00:00Z"
null
[]null
Expand the config instances using 'expand[]=config_instances' in the query string.
Hide child attributes
config_instance "config_instance"
ID of the config instance.
"cfg_inst_123"
Desired state of the config instance.
created, deployed, removed Last known activity state of the config instance.
created, queued, deployed, removed Last known error state of the config instance deployment.
none, failed, retrying This status merges the 'activity_status' and 'error_status' fields, with error states taking precedence over activity states when errors are present. For example, if the activity status is 'deployed' but the error status is 'failed', the status is 'failed'. However, if the error status is 'none' and the activity status is 'deployed', the status is 'deployed'.
created, queued, deployed, removed, failed, retrying The file path to deploy the config instance relative to /srv/miru/config_instances. v1/motion-control.json would deploy to /srv/miru/config_instances/v1/motion-control.json.
"/v1/motion-control.json"
The timestamp of when the config instance was created.
"2021-01-01T00:00:00Z"
The timestamp of when the config instance was last updated.
"2021-01-01T00:00:00Z"
ID of the device which the config instance is deployed to.
"dvc_123"
ID of the config schema which the config instance must adhere to.
"cfg_sch_123"
ID of the config type which the config instance (and its schema) is a part of.
"cfg_type_123"
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"
null
Expand the config schema using 'expand[]=config_schema' in the query string.
Hide child attributes
config_schema "config_schema"
ID of the config schema.
"cfg_sch_123"
Config schema version for the config type.
2
Hash of the config schema contents.
"1234567890"
The file path to deploy the config instance relative to /srv/miru/config_instances. v1/motion-control.json would deploy to /srv/miru/config_instances/v1/motion-control.json.
"/v1/motion-control.json"
Timestamp of when the config schema was created.
"2021-01-01T00:00:00Z"
Timestamp of when the config schema was last updated.
"2021-01-01T00:00:00Z"
ID of the config type.
"cfg_typ_123"
The config schema's JSON Schema definition.
{
"title": "Robot Features",
"type": "object",
"properties": {
"enable_autonomy": { "type": "boolean", "default": true },
"enable_remote_control": { "type": "boolean", "default": true },
"max_payload_kg": {
"type": "number",
"minimum": 0,
"maximum": 99,
"default": 10
},
"preferred_speed_mode": {
"type": "string",
"enum": ["slow", "normal", "fast"],
"default": "normal"
},
"emergency_stop_sensitivity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.8
},
"telemetry": {
"type": "object",
"properties": {
"upload_interval_sec": {
"type": "integer",
"minimum": 10,
"maximum": 600,
"default": 60
},
"heartbeat_interval_sec": {
"type": "integer",
"minimum": 1,
"maximum": 60,
"default": 10
}
},
"required": [
"upload_interval_sec",
"heartbeat_interval_sec"
]
}
},
"required": [
"enable_autonomy",
"enable_remote_control",
"max_payload_kg",
"preferred_speed_mode",
"emergency_stop_sensitivity",
"telemetry"
]
}Expand the config type using 'expand[]=config_type' in the query string.
Hide child attributes
config_type "config_type"
ID of the config type.
"cfg_123"
Name of the config type.
"My Config Type"
An immutable, code-friendly name for the config type.
"my-config-type"
Timestamp of when the config type was created.
"2021-01-01T00:00:00Z"
Timestamp of when the config type was last updated.
"2021-01-01T00:00:00Z"
null
null
The configuration values associated with the config instance. Expand the content using 'expand[]=content' in the query string.
{
"enable_autonomy": true,
"enable_remote_control": false,
"max_payload_kg": 8.5,
"preferred_speed_mode": "normal",
"emergency_stop_sensitivity": 0.9,
"telemetry": {
"upload_interval_sec": 45,
"heartbeat_interval_sec": 15
}
}Expand the config type using 'expand[]=config_type' in the query string.
Hide child attributes
config_type "config_type"
ID of the config type.
"cfg_123"
Name of the config type.
"My Config Type"
An immutable, code-friendly name for the config type.
"my-config-type"
Timestamp of when the config type was created.
"2021-01-01T00:00:00Z"
Timestamp of when the config type was last updated.
"2021-01-01T00:00:00Z"
null