### Get Current Deployment API Examples Source: https://docs.mirurobotics.com/references/device-api/v0.2.1/endpoints/deployments/get-current Examples for retrieving the current deployment using cURL via a Unix socket or the Python SDK. ```curl curl \ --unix-socket /run/miru/miru.sock \ --request GET \ --url http://localhost/v0.2/deployments/current ``` ```python from miru_device_sdk import Miru ``` -------------------------------- ### GET /beta/config_instances Source: https://docs.mirurobotics.com/developers/platform-api/query-params/pagination Example of using pagination query parameters to list config instances. ```APIDOC ## GET /beta/config_instances ### Description Retrieves a paginated list of config instances using limit and offset parameters. ### Method GET ### Endpoint https://api.mirurobotics.com/beta/config_instances ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return (default: 10, max: 100). - **offset** (integer) - Optional - The starting position of the current page (default: 0). ### Request Example curl --request GET \ --url 'https://api.mirurobotics.com/beta/config_instances?limit=10&offset=0' \ --header 'X-API-Key: ' \ --header 'Miru-Version: 2026-05-06.rainier' ``` -------------------------------- ### Base Deployment Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/create Example object structure for a deployment. ```yaml object: deployment id: dpl_123 description: Deployment for the motion control config instance device_id: dvc_123 release_id: rls_123 created_at: '2024-01-01T00:00:00Z' updated_at: '2024-01-01T00:00:00Z' ``` -------------------------------- ### Instance Content Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/list Example structure for configuration instance content, including format and data fields. ```json { "enable_autonomy": true, "enable_remote_control": true, "max_payload_kg": 10.0 } ``` ```json format: json data: | { "enable_autonomy": true, "enable_remote_control": true, "max_payload_kg": 10.0 } ``` -------------------------------- ### Release creation output examples Source: https://docs.mirurobotics.com/cfg-mgmt/create-a-release Examples showing the CLI output when creating a release with new or existing schemas. ```bash $ miru release create \ --version v1.0.0 \ --schemas ./cue/strict-schemas/ ◐ Creating release v1.0.0 ✓ Pushed git commit (new) 1c7f7a8 · mirurobotics/getting-started ◐ Pushing schemas ✓ Mobility · SCH-D5nFP (new) ✓ Planning · SCH-37QAr (new) ✓ Communication · SCH-9WfCx (new) ✓ Created release v1.0.0 ``` ```bash $ miru release create \ --version v1.0.0 \ --schemas ./cue/strict-schemas/ ◐ Creating release v1.0.0 ✓ Pushed git commit (existed) 1c7f7a8 · mirurobotics/getting-started ◐ Pushing schemas ✓ Mobility · SCH-D5nFP (existed) ✓ Planning · SCH-37QAr (existed) ✓ Communication · SCH-9WfCx (existed) ✓ Created release v1.0.0 ``` -------------------------------- ### Deployment Object Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/get Example structure of a deployment object. ```yaml example: object: deployment id: dpl_123 description: Deployment for the motion control config instance status: staged activity_status: staged error_status: none target_status: staged device_id: dvc_123 release_id: rls_123 created_at: '2024-01-01T00:00:00Z' updated_at: '2024-01-01T00:00:00Z' ``` -------------------------------- ### Config Schema List Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/deploy Example array of configuration schemas associated with a release. ```yaml - object: config_schema id: cfg_sch_123 digest: sha256:1234567890 config_type_name: Motion Control instance_filepath: /srv/miru/configs/v1/motion-control.json created_at: '2021-01-01T00:00:00Z' updated_at: '2021-01-01T00:00:00Z' config_type_id: cfg_typ_123 language: jsonschema format: json - object: config_schema id: cfg_sch_124 digest: sha256:1234567890 config_type_name: Localization instance_filepath: /srv/miru/configs/v1/localization.json created_at: '2021-01-01T00:00:00Z' updated_at: '2021-01-01T00:00:00Z' config_type_id: cfg_typ_124 language: jsonschema format: json ``` -------------------------------- ### Install Miru CLI via APT Source: https://docs.mirurobotics.com/developers/cli/install Install the CLI package after configuring the repository. Specific versions can be installed by appending the version number. ```bash sudo apt-get update sudo apt-get install miru-cli ``` -------------------------------- ### Device Object Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/list Example of a device object structure. ```yaml example: object: device id: dvc_123 name: My Device status: online agent_version: v1.0.0 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' ``` -------------------------------- ### Get Deployment API Request Source: https://docs.mirurobotics.com/references/device-api/v0.2.1/endpoints/deployments/get Examples for retrieving deployment information using cURL and the Python SDK. ```curl curl \ --unix-socket /run/miru/miru.sock \ --request GET \ --url http://localhost/v0.2/deployments/{deployment_id} ``` ```python from miru_device_sdk import Miru ``` -------------------------------- ### Config Instance Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/deploy Example object representing a configuration instance. ```yaml object: config_instance id: cfg_inst_123 config_type_name: Motion Control filepath: /srv/miru/configs/v1/motion-control.json created_at: '2021-01-01T00:00:00Z' config_schema_id: cfg_sch_123 config_type_id: cfg_typ_123 ``` -------------------------------- ### Instance Content Data Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/get Example of the configuration values structure within an InstanceContent object. ```json { "enable_autonomy": true, "enable_remote_control": true, "max_payload_kg": 10.0 } ``` -------------------------------- ### BaseConfigType Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/get Example of a BaseConfigType object structure. ```yaml object: config_type id: cfg_123 name: My Config Type slug: my-config-type created_at: '2021-01-01T00:00:00Z' updated_at: '2021-01-01T00:00:00Z' ``` -------------------------------- ### Config Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/create Example object structure for a configuration schema. ```yaml example: object: config_schema id: cfg_sch_123 digest: sha256:1234567890 config_type_name: Motion Control instance_filepath: /srv/miru/configs/v1/motion-control.json created_at: '2021-01-01T00:00:00Z' updated_at: '2021-01-01T00:00:00Z' config_type_id: cfg_typ_123 language: jsonschema format: json ``` -------------------------------- ### Base Config Instance Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/update Example of the object type constant for a configuration instance. ```yaml example: config_instance ``` -------------------------------- ### Example Output: Directory Source: https://docs.mirurobotics.com/developers/agent/filesys-access Output showing verification for directory access permissions. ```text $ ./check-miru-access.sh /var/lib/myapp/configs Permission checks for: /var/lib/myapp/configs | Target Type | Read | Write | Execute | Path | ----------- | ---- | ----- | ------- | ---- | directory | OK | OK | OK | /var/lib/myapp/configs | ancestor | - | - | OK | /var/lib/myapp | ancestor | - | - | OK | /var/lib | ancestor | - | - | OK | /var | ancestor | - | - | OK | / FINAL RESULT: PASS ``` -------------------------------- ### Release Object Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/get Example structure of a release object. ```yaml example: object: release id: rls_123 version: v1.0.0 git_commit_id: git_commit_123 created_at: '2024-01-01T00:00:00Z' updated_at: '2024-01-01T00:00:00Z' ``` -------------------------------- ### Archive Deployment Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/archive Example usage for archiving a deployment by its unique identifier. ```python deployment_id="dpl_123", ) print(deployment.id) ``` -------------------------------- ### Instance Content Object Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/get Example of a complete InstanceContent object including format and data fields. ```json format: json data: | { "enable_autonomy": true, "enable_remote_control": true, "max_payload_kg": 10.0 } ``` -------------------------------- ### Install miru-agent Source: https://docs.mirurobotics.com/cfg-mgmt/provision-devices/provisioning-tokens Installs the miru-agent package after the repository has been configured. ```bash sudo apt-get update sudo apt-get install miru-agent ``` -------------------------------- ### Config Type Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/create Example structure for a configuration type object. ```yaml object: config_type id: cfg_typ_123 name: Motion Control slug: motion-control created_at: '2021-01-01T00:00:00Z' updated_at: '2021-01-01T00:00:00Z' created_by_id: usr_123 updated_by_id: usr_123 ``` -------------------------------- ### SSE Event Stream Example Source: https://docs.mirurobotics.com/developers/device-api/events An example of a deployment.deployed event as it appears in an SSE stream. ```text event: deployment.deployed data: {"object":"event","id":42,"type":"deployment.deployed","occurred_at":"2026-03-10T12:00:00Z","data":{...}} ``` -------------------------------- ### Base Config Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/create Example structure for a configuration schema object. ```yaml - id: doc_123 name: main.json data: | { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object" } ``` -------------------------------- ### mirurobotics/setup-cli Source: https://docs.mirurobotics.com/developers/ci/gh-actions Configuration for the Miru CLI setup action used in GitHub Actions workflows. ```APIDOC ## mirurobotics/setup-cli ### Description Sets up the Miru CLI environment on a GitHub Actions runner. ### Inputs - **version** (string) - Optional - Miru version of the CLI to install. Supports exact (e.g., v0.10.1) and minor (e.g., v0.10) versions. Defaults to 'latest' if omitted. ### Outputs - **version** (string) - The version of the Miru CLI that was installed. ### Supported Platforms - Linux (x86_64, arm64) ### Usage Example ```yaml - name: Setup Miru CLI uses: mirurobotics/setup-cli@v0.2 with: version: 'v0.10.1' ``` ``` -------------------------------- ### Device Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/deploy Example object representing a device entity. ```yaml object: device id: dvc_123 name: My Device status: online agent_version: v1.0.0 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' ``` -------------------------------- ### Config Schema Documents Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/create Example of the documents property within a configuration schema. ```json [ { "id": "doc_123", "name": "main.json", "data": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\"\n}" } ] ``` -------------------------------- ### List Releases Python Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/releases/list Basic usage of the client to fetch and print the list of releases. ```python release_list = client.releases.list() print(release_list) ``` -------------------------------- ### Expand Query Parameter Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06 Example value for the expand query parameter. ```json ["content"] ``` -------------------------------- ### Retrieve a Config Instance Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/get Example usage for fetching a configuration instance by its unique identifier. ```python config_instance_id="cfg_inst_123", ) print(config_instance.id) ``` -------------------------------- ### Base Config Schema Documents Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/get Example of the documents array structure within a BaseConfigSchema object. ```json - id: doc_123 name: main.json data: | { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object" } ``` -------------------------------- ### Schema Document Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/get Represents the structure of a configuration instance document. ```json { "id": "doc_123", "name": "main.json", "data": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\"\n}" } ``` -------------------------------- ### Install Miru CLI on macOS Source: https://docs.mirurobotics.com/developers/cli/install Use Homebrew to install the CLI. Run brew update if the latest version is not detected. ```bash brew install mirurobotics/cli/miru ``` -------------------------------- ### GET /beta/config_instances Source: https://docs.mirurobotics.com/developers/platform-api/query-params/pagination Retrieves a paginated list of configuration instances. ```APIDOC ## GET /beta/config_instances ### Description Retrieves a list of configuration instances. Use the limit and offset query parameters to paginate through the results. ### Method GET ### Endpoint https://api.mirurobotics.com/beta/config_instances ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return. - **offset** (integer) - Optional - The number of items to skip before starting to collect the result set. ### Response #### Success Response (200) - **object** (string) - The type of object returned (list). - **limit** (integer) - The limit used for the request. - **offset** (integer) - The offset used for the request. - **has_more** (boolean) - Indicates if there are more items available beyond the current page. - **data** (array) - A list of configuration instance objects. #### Response Example { "object": "list", "limit": 10, "offset": 0, "has_more": true, "data": [ { "object": "config_instance", "id": "cfg_inst_123" } ] } ``` -------------------------------- ### Bucket Name Example Source: https://docs.mirurobotics.com/data-uploads/connect-a-bucket/aws The name of the S3 bucket to be connected. ```text my-upload-bucket ``` -------------------------------- ### Config Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/create Represents the structure of a configuration schema object. ```json { "object": "config_schema", "id": "cfg_sch_123", "digest": "sha256:1234567890", "config_type_name": "Motion Control", "instance_filepath": "/srv/miru/configs/v1/motion-control.json", "created_at": "2021-01-01T00:00:00Z", "updated_at": "2021-01-01T00:00:00Z", "config_type_id": "cfg_typ_123", "language": "jsonschema", "format": "json" } ``` -------------------------------- ### Clone the getting-started repository Source: https://docs.mirurobotics.com/getting-started/quick-start/create-release Use this command to download the repository containing the necessary files for creating a release. ```bash git clone https://github.com/mirurobotics/getting-started.git ``` -------------------------------- ### Deployment Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/list Represents the structure of a deployment object, including nested configuration instances. ```json { "object": "deployment", "id": "dpl_123", "description": "Deployment for the motion control config instance", "status": "staged", "activity_status": "staged", "error_status": "none", "target_status": "staged", "device_id": "dvc_123", "release_id": "rls_123", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ``` ```json [ { "object": "config_instance", "id": "cfg_inst_123", "config_type_name": "Motion Control", "filepath": "/srv/miru/configs/v1/motion-control.json", "created_at": "2021-01-01T00:00:00Z", "config_schema_id": "cfg_sch_123", "config_type_id": "cfg_typ_123" }, { "object": "config_instance", "id": "cfg_inst_124", "config_type_name": "Localization", "filepath": "/srv/miru/configs/v1/localization.json", "created_at": "2021-01-01T00:00:00Z", "config_schema_id": "cfg_sch_124", "config_type_id": "cfg_typ_124" } ] ``` -------------------------------- ### Config Type Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/create Represents the structure of a configuration type object. ```json { "object": "config_type", "id": "cfg_typ_123", "name": "Motion Control", "slug": "motion-control", "created_at": "2021-01-01T00:00:00Z", "updated_at": "2021-01-01T00:00:00Z", "created_by_id": "usr_123", "updated_by_id": "usr_123" } ``` -------------------------------- ### GET /config_instances Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/list Retrieves a list of all available configuration instances. ```APIDOC ## GET /config_instances ### Description List all configuration instances available in the system. ### Method GET ### Endpoint /config_instances ### Parameters #### Required Scopes - **config_instances:read** ``` -------------------------------- ### Config Instance Response Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06 The JSON structure returned upon a successful retrieval request. ```json { "object": "config_instance", "id": "cfg_inst_123", "config_type_name": "Motion Control", "filepath": "/srv/miru/configs/v1/motion-control.json", "created_at": "2021-01-01T00:00:00Z", "config_schema_id": "cfg_sch_123", "config_type_id": "cfg_typ_123" } ``` -------------------------------- ### CUE Schema File Paths Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/create Example of specifying multiple CUE schema files. ```yaml - path/to/config/schema/robot1.cue - path/to/config/schema/robot2.cue ``` -------------------------------- ### List Config Schemas Python SDK Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/list Initializes the Miru client for interacting with the platform API. ```python import os from miru_platform_sdk import Miru client = Miru( ``` -------------------------------- ### Create a Release in Python Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/releases/create Initializes the client and creates a new release with specified configuration schema IDs and a version string. ```python api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) release = client.releases.create( config_schema_ids=["cfg_sch_123"], version="v1.0.0", ) print(release.id) ``` -------------------------------- ### Example Output: Existing File Source: https://docs.mirurobotics.com/developers/agent/filesys-access Output showing successful permission verification for an existing file. ```text $ ./check-miru-access.sh /var/lib/myapp/configs/mobility.yaml Permission checks for: /var/lib/myapp/configs/mobility.yaml | Target Type | Read | Write | Execute | Path | ----------- | ---- | ----- | ------- | ---- | file | OK | OK | - | /var/lib/myapp/configs/mobility.yaml | parent | OK | OK | OK | /var/lib/myapp/configs | ancestor | - | - | OK | /var/lib/myapp | ancestor | - | - | OK | /var/lib | ancestor | - | - | OK | /var | ancestor | - | - | OK | / FINAL RESULT: PASS ``` -------------------------------- ### Execute Provisioning Script Source: https://docs.mirurobotics.com/cfg-mgmt/provision-devices/provisioning-script Run the provisioning script to install the Miru Agent and register the device with the control plane. ```bash curl -fsSL https://raw.githubusercontent.com/mirurobotics/agent/main/scripts/install/provision.sh | sh -s -- \ --device-name=$HOSTNAME \ --allow-reactivation=true ``` -------------------------------- ### Example Output: Non-existent File Source: https://docs.mirurobotics.com/developers/agent/filesys-access Output showing verification for a file that does not exist, focusing on parent directory permissions. ```text $ ./check-miru-access.sh /var/lib/myapp/configs/mobility.json Permission checks for: /var/lib/myapp/configs/mobility.json Note: target file is not visible to this user (missing or not traversable); skipping file checks. | Target Type | Read | Write | Execute | Path | ----------- | ---- | ----- | ------- | ---- | parent | OK | OK | OK | /var/lib/myapp/configs | ancestor | - | - | OK | /var/lib/myapp | ancestor | - | - | OK | /var/lib | ancestor | - | - | OK | /var | ancestor | - | - | OK | / FINAL RESULT: PASS ``` -------------------------------- ### Release Schema Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/deploy Example object representing a release entity. ```yaml object: release id: rls_123 version: v1.0.0 git_commit_id: git_commit_123 created_at: '2024-01-01T00:00:00Z' updated_at: '2024-01-01T00:00:00Z' ``` -------------------------------- ### GET /beta/config_instances/{config_instance_id} Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06 Retrieves the details of a specific configuration instance by its unique identifier. ```APIDOC ## GET /beta/config_instances/{config_instance_id} ### Description Retrieves the details of a specific configuration instance by its unique identifier. ### Method GET ### Endpoint https://api.mirurobotics.com/beta/config_instances/{config_instance_id} ### Parameters #### Path Parameters - **config_instance_id** (string) - Required - The unique identifier of the config instance. #### Query Parameters - **expand** (enum[]) - Optional - Fields to expand on the config instance resource. Available options: content, config_schema, config_type. ### Response #### Success Response (200) - **object** (string) - The resource type. - **id** (string) - The unique identifier of the config instance. - **config_type_name** (string) - The name of the configuration type. - **filepath** (string) - The file path of the configuration. - **created_at** (string) - The timestamp when the instance was created. - **config_schema_id** (string) - The ID of the associated configuration schema. - **config_type_id** (string) - The ID of the associated configuration type. #### Response Example { "object": "config_instance", "id": "cfg_inst_123", "config_type_name": "Motion Control", "filepath": "/srv/miru/configs/v1/motion-control.json", "created_at": "2021-01-01T00:00:00Z", "config_schema_id": "cfg_sch_123", "config_type_id": "cfg_typ_123" } ``` -------------------------------- ### Retrieve a device using the Python SDK Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/get Demonstrates how to initialize the Miru client and fetch a device by its ID. ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) device = client.devices.retrieve( device_id="dvc_123", ) print(device.id) ``` -------------------------------- ### Create Config Instance with Python SDK Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/create Initializes the Miru client using an API key from environment variables. ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ``` -------------------------------- ### Create a Deployment with the Miru Python Client Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/create Initializes the Miru client and creates a new deployment with specified configuration instances and target status. ```python client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) deployment = client.deployments.create( config_instance_ids=["cfg_inst_123"], description="Deployment for the motion control config instance", device_id="dvc_123", release_id="rls_123", target_status="staged", ) print(deployment.id) ``` -------------------------------- ### Create a provisioning token Source: https://docs.mirurobotics.com/cfg-mgmt/provision-devices/provisioning-tokens Use these examples to generate a provisioning token. Tokens expire in 5 minutes and are for one-time use. ```bash export MIRU_API_KEY= curl --request POST \ --url https://api.mirurobotics.com/beta/provisioning_tokens \ --header 'Miru-Version: 2026-05-06.rainier' \ --header "X-API-Key: $MIRU_API_KEY" ``` ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), ) provisioning_token = client.provisioning_tokens.create() # access token via provisioning_token.token ``` -------------------------------- ### Retrieve Config Instance via SDK and HTTP Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06 Examples for fetching a configuration instance using the official Python SDK or standard HTTP request libraries. ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) config_instance = client.config_instances.retrieve( config_instance_id="cfg_inst_123", ) print(config_instance.id) ``` ```bash curl --request GET \ --url https://api.mirurobotics.com/beta/config_instances/{config_instance_id} \ --header 'Miru-Version: ' \ --header 'X-API-Key: ' ``` ```javascript const options = { method: 'GET', headers: {'Miru-Version': '', 'X-API-Key': ''} }; fetch('https://api.mirurobotics.com/beta/config_instances/{config_instance_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` ```php "https://api.mirurobotics.com/beta/config_instances/{config_instance_id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Miru-Version: ", "X-API-Key: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mirurobotics.com/beta/config_instances/{config_instance_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Miru-Version", "") req.Header.Add("X-API-Key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```java HttpResponse response = Unirest.get("https://api.mirurobotics.com/beta/config_instances/{config_instance_id}") .header("Miru-Version", "") .header("X-API-Key", "") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.mirurobotics.com/beta/config_instances/{config_instance_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Miru-Version"] = '' request["X-API-Key"] = '' response = http.request(request) puts response.read_body ``` -------------------------------- ### SchemaDocument Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/get Example of a SchemaDocument object containing a JSON schema definition. ```yaml id: doc_123 name: main.json data: | { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object" } ``` -------------------------------- ### Update Device Python SDK Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/update Initialization of the Miru client using the Python SDK. ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) ``` -------------------------------- ### Create a Provisioning Token with Python Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/provisioning-tokens/create Initializes the Miru client and generates a new provisioning token. ```python client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) provisioning_token = client.provisioning_tokens.create() print(provisioning_token.token) ``` -------------------------------- ### Schema Document Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/archive Example of a schema document containing a JSON schema definition. ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object" } ``` -------------------------------- ### Configure Miru apt repository Source: https://docs.mirurobotics.com/cfg-mgmt/provision-devices/provisioning-tokens Sets up the necessary dependencies, signing keys, and sources list for the Miru apt repository. ```bash # ensure the appropriate dependencies are installed sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg # add Miru's signing key sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://packages.mirurobotics.com/apt/miru.gpg -o /tmp/miru.gpg.armor sudo gpg --dearmor -o /etc/apt/keyrings/miru-archive-keyring.gpg /tmp/miru.gpg.armor rm /tmp/miru.gpg.armor sudo chmod a+r /etc/apt/keyrings/miru-archive-keyring.gpg # add the repository to your sources list sudo tee /etc/apt/sources.list.d/miru.sources > /dev/null <.deb ``` -------------------------------- ### List Config Schemas Python Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/list Retrieves a list of configuration schemas using the client library. ```python api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) config_schema_list = client.config_schemas.list() print(config_schema_list) ``` -------------------------------- ### View release creation confirmation Source: https://docs.mirurobotics.com/getting-started/quick-start/create-release Example output displayed in the terminal upon successful release creation. ```bash $ miru release create \ --version v1.0.0 \ --schemas ./{schema-language}/{schema-type}/ ◐ Creating release v1.0.0 ✓ Pushed git commit (new) 1c7f7a8 · mirurobotics/getting-started ◐ Pushing schemas ✓ Mobility · SCH-D5nFP (new) ✓ Planning · SCH-37QAr (new) ✓ Communication · SCH-9WfCx (new) ✓ Created release v1.0.0 ``` -------------------------------- ### Create Config Type Python SDK Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-types/create Initializes the Miru client for interacting with the platform API. ```python import os from miru_platform_sdk import Miru ``` -------------------------------- ### Usage Example of Framed Component Source: https://docs.mirurobotics.com/admin/workspace Example implementation of the Framed component with specific background and border settings. ```jsx ``` -------------------------------- ### CLI Authentication Prompt Example Source: https://docs.mirurobotics.com/developers/cli/login This shows the expected interactive output when prompted for an authentication token in the CLI. ```text Please retrieve your authentication token from the following URL: 🔗 https://app.mirurobotics.com/settings/cli-token 🔑 Paste your authentication token: ********** Validating authentication token... ✅ Successfully logged in as Benjamin ``` -------------------------------- ### Create a device using the Python SDK Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/create Initializes the Miru client and creates a new device with a specified name. ```python import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) device = client.devices.create( name="Robot 1", ) ``` -------------------------------- ### Base Config Instance Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/create Defines the structure and required fields for a configuration instance object. ```yaml object: type: string enum: - config_instance example: config_instance x-stainless-const: true description: The object type, which is always `config_instance`. id: type: string example: cfg_inst_123 description: ID of the config instance. config_type_name: type: string example: Motion Control description: The name of the config type. filepath: type: string example: /srv/miru/configs/v1/motion-control.json description: The absolute file system path where this config instance is written. created_at: type: string format: date-time example: '2021-01-01T00:00:00Z' description: The timestamp of when the config instance was created. config_schema_id: type: string example: cfg_sch_123 description: ID of the config schema which the config instance must adhere to. config_type_id: type: string example: cfg_type_123 description: >- ID of the config type which the config instance (and its schema) is a part of. ``` -------------------------------- ### OpenAPI Specification for Get Deployment Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/deployments/get The OpenAPI definition for the GET /deployments/{deployment_id} endpoint, including security requirements and response schemas. ```yaml openapi: 3.0.3 info: title: Miru Platform API description: The API between Miru and any external client version: 2026-05-06.rainier license: name: MIT url: https://opensource.org/licenses/MIT x-release-version: 2026-05-06.rainier-beta.3 x-git-commit: sha: 79734a65778aea4131f502774643d1d69a262542 url: >- https://github.com/mirurobotics/openapi/commit/79734a65778aea4131f502774643d1d69a262542 message: >- fix(release/stainless): publish stainless.yml asset for platform and device (#57) ## Summary The release workflow publishes a `stainless.yml` asset alongside each spec release for downstream Stainless SDK pipelines. It worked for `cli` and `frontend` audiences but silently skipped `platform` and `device`. **Root cause:** `STAINLESS_CONFIG` in `tools/release/stainless.py` pointed `device` and `platform` at a nested layout (`tools/stainless/{device,platform}/stainless.yml`) that never existed. The actual files have lived at the flat `tools/stainless/{device,platform}.yml` since commit `214bf44` (2026-03-04, "refactor(stainless): simplify config names to platform.yml and device.yml"). The mismatch was masked by `build_stainless_target` silently returning `None` when the source file was missing, so every platform and device release shipped without its `stainless.yml` asset. ## Changes 1. **Fix the two paths in `STAINLESS_CONFIG`** to point at the flat `tools/stainless/{platform,device}.yml` layout that exists on disk. 2. **Replace the silent `if not src.exists(): return None`** with `raise FileNotFoundError(...)` so a future mapped-but-missing config fails loudly. Audiences not in the dict (agent, mqtt, webhooks) still return `None` cleanly — that's the legitimate "no Stainless SDK for this audience" case. 3. **Add regression tests:** - `test_known_audiences_have_real_files_on_disk` — parametrized over `STAINLESS_CONFIG.items()`, asserts each path resolves to an existing file. This is the test that would have caught the original bug. - `test_missing_src_for_mapped_audience_raises` — replaces the old `test_missing_src_returns_none`, pins the new loud-error contract. - `test_unmapped_audience_returns_none_cleanly` — pins the preserved clean-skip behaviour for unmapped audiences. Two existing build-target tests in `tools/release/tests/test_release_build.py` were rewired to mock `build_stainless_target`; they had been silently riding on the old skip-on-missing-source behaviour and would have failed under the new contract. The functional integration is already covered by `test_build_target_calls_stainless`. No CI workflow edits, no file restructuring under `tools/stainless/`, no historical-tag backfilling. ## Test plan - [ ] Unit tests pass (`tools/release/tests/`) - [ ] Preflight passes - [ ] Manual `./build/build-release.sh --snapshot` validation produces `platform.stainless.yml` and `device.stainless.yml` under `build/dist/` --------- Co-authored-by: Claude Opus 4.7 (1M context) author: ben-miru branch: HEAD dirty: false x-build: built_at: '2026-05-06T22:31:02.715859+00:00' servers: - url: https://api.mirurobotics.com/beta description: Miru Platform API security: - ApiKeyAuth: [] paths: /deployments/{deployment_id}: parameters: - $ref: '#/components/parameters/MiruVersion' get: tags: - Deployments summary: Get description: Retrieve a deployment by its ID. operationId: getDeployment parameters: - $ref: '#/components/parameters/deployment_id' - $ref: '#/components/parameters/deployment_expansions' responses: '200': description: Successfully retrieved the deployment. content: application/json: schema: $ref: '#/components/schemas/Deployment' x-codeSamples: - lang: Python source: |- import os from miru_platform_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) deployment = client.deployments.retrieve( deployment_id="dpl_123", ) ``` -------------------------------- ### Create a Config Instance in Python Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-instances/create Use the client's config_instances.create method to instantiate a new configuration based on a schema ID and content. ```python config_instance = client.config_instances.create( config_schema_id="cfg_sch_123", content={ "data": "{\n \"enable_autonomy\": true,\n \"enable_remote_control\": true,\n \"max_payload_kg\": 10.0\n}\n", "format": "json", }, ) print(config_instance.id) ``` -------------------------------- ### GET /releases Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/releases/list List all available releases. ```APIDOC ## GET /releases ### Description List releases. ### Method GET ### Endpoint /releases ### Parameters #### Query Parameters - **offset** (integer) - Optional - The number of items to skip before starting to collect the result set. - **limit** (integer) - Optional - The maximum number of items to return. - **release_order_bys** (string) - Optional - Specifies the ordering of the returned releases. - **release_list_expansions** (string) - Optional - Specifies fields to expand in the response. - **release_search_id** (string) - Optional - Filter releases by ID. - **release_search_version** (string) - Optional - Filter releases by version. ### Response #### Success Response (200) - **ReleaseList** (object) - Successfully listed the releases. ``` -------------------------------- ### GET /version Source: https://docs.mirurobotics.com/references/device-api/v0.2.1/endpoints/agent/version Retrieve the version of the agent. ```APIDOC ## GET /version ### Description Retrieve the version of the agent. ### Method GET ### Endpoint /version ### Response #### Success Response (200) - **version** (string) - The version of the agent. - **git_commit** (string) - The git commit of the agent. - **api_version** (string) - The API version of the agent. - **api_git_commit** (string) - The git commit of the API. - **rust_version** (string) - The version of Rust. - **build_date** (string) - The build date of the agent. - **os** (string) - The operating system of the agent. - **arch** (string) - The architecture of the agent. #### Response Example { "version": "v1.0.0", "git_commit": "a1b2c3d4", "api_version": "v1-0", "api_git_commit": "a1b2c3d4", "rust_version": "1.93.0", "build_date": "2026-02-24T10:30:00Z", "os": "linux", "arch": "aarch64" } ``` -------------------------------- ### GET /devices/{device_id} Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/devices/get Retrieves a device by its ID. ```APIDOC ## GET /devices/{device_id} ### Description Get a device by ID. ### Method GET ### Endpoint /devices/{device_id} ### Parameters #### Path Parameters - **device_id** (string) - Required - The unique identifier of the device. ``` -------------------------------- ### Create a Config Schema in Python Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/config-schemas/create Initializes a client and creates a new configuration schema using the specified language and format. ```python api_key=os.environ.get("MIRU_API_KEY"), # This is the default and can be omitted ) config_schema = client.config_schemas.create( config_type_ref={}, documents=[{ "data": "data", "name": "motion-control.json", }], format="json", language="jsonschema", ) print(config_schema.id) ``` -------------------------------- ### GET /principal Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/principals/self Retrieve the currently authenticated principal. ```APIDOC ## GET /principal ### Description Retrieve the currently authenticated principal. ### Method GET ### Endpoint /principal ### Response #### Success Response (200) - **Principal** (object) - Successfully retrieved the principal. ``` -------------------------------- ### GET /deployments/{deployment_id} Source: https://docs.mirurobotics.com/references/device-api/v0.2.1/endpoints/deployments/get Retrieve a deployment by its ID. ```APIDOC ## GET /deployments/{deployment_id} ### Description Retrieve a deployment by its ID. ### Method GET ### Endpoint /deployments/{deployment_id} ### Parameters #### Path Parameters - **deployment_id** (string) - Required - The unique identifier of the deployment. ``` -------------------------------- ### Create a release using individual schema files Source: https://docs.mirurobotics.com/references/cli/release-create Use the --schema flag to specify individual schema files to include in the release. ```bash miru release create \ --version {version} \ --schema {path/to/schema1.yaml} \ --schema {path/to/schema2.yaml} ``` -------------------------------- ### GET /deployments/current Source: https://docs.mirurobotics.com/references/device-api/v0.2.1/endpoints/deployments/get-current Retrieves the current deployment for the device. ```APIDOC ## GET /deployments/current ### Description Get the current deployment for the device. ### Method GET ### Endpoint /deployments/current ### Response #### Success Response (200) - **Deployment** (object) - Successfully retrieved the current deployment. ``` -------------------------------- ### Schema Language Example Source: https://docs.mirurobotics.com/references/platform-api/2026-05-06/endpoints/releases/list Defines the supported schema languages. ```yaml jsonschema ``` -------------------------------- ### Check Agent Version Source: https://docs.mirurobotics.com/developers/agent/commands Displays the currently installed version of the miru-agent. ```bash miru-agent --version ```