Config Schemas

Create

Create a new config schema.

post/config_schemas

Request

  • Base URL
    https://api.mirurobotics.com/beta
  • URL
    https://api.mirurobotics.com/beta/config_schemas
  • Auth
    API key in header X-API-Key

Query parameters

expandConfigSchemaExpansion[]

Fields to expand on the config schema resource.

[
  "documents"
]

Request body

instance_format'json' | 'yaml' | 'jsonc' | 'xml' | 'csv' | 'text'

The serialization format of config content. A config instance is written to the device filesystem in this format.

  • json: standard JSON.
  • yaml: YAML 1.2.
  • jsonc: JSON with comments (JSON plus // and /* */ comment syntax).
  • xml: XML.
  • csv: comma-separated values (RFC 4180).
  • text: plain, unstructured text with no specific format.
language'jsonschema' | 'cue' | 'opaque' required
format'json' | 'yaml' | 'cue' required

Example request

{
  "config_type_ref": {
    "id": "cfg_123",
    "slug": "my-config-type"
  },
  "instance_slots": [
    {
      "key": "controller_2",
      "name": "Controller 2",
      "filepath": "/var/local/forge/configuration/robot_drivers/controller_2/topic_list.yaml",
      "required": true,
      "description": "Topic list for the second motor controller."
    }
  ],
  "language": "jsonschema",
  "documents": [
    {
      "name": "motion-control.json"
    }
  ],
  "git_commit": {
    "commit_ref": {
      "id": "git_cmt_123",
      "sha": "1a2b3c4d..."
    },
    "schema_filepaths": [
      "path/to/config/schema/robot1.cue",
      "path/to/config/schema/robot2.cue"
    ]
  }
}

Response

Successfully created the config schema.

object'config_schema' required

The object type, which is always config_schema.

idstring required

ID of the config schema.

digeststring required

The digest of the config schema.

os'linux' | 'windows' required

An operating system family, from the agent's build-time OS vocabulary. Shared across resources (devices, config schemas, file rules, releases). This is the machine-readable OS kind, distinct from a human-readable version string.

  • linux
  • windows
config_type_namestring required

The name of the config type.

instance_format'json' | 'yaml' | 'jsonc' | 'xml' | 'csv' | 'text' required

The serialization format of config content. A config instance is written to the device filesystem in this format.

  • json: standard JSON.
  • yaml: YAML 1.2.
  • jsonc: JSON with comments (JSON plus // and /* */ comment syntax).
  • xml: XML.
  • csv: comma-separated values (RFC 4180).
  • text: plain, unstructured text with no specific format.
created_atstring date-time required

Timestamp of when the config schema was created.

updated_atstring date-time required

Timestamp of when the config schema was last updated.

config_type_idstring required

ID of the config type.

language'jsonschema' | 'cue' | 'opaque' required
format'json' | 'yaml' | 'cue' required

Example response

{
  "object": "config_schema",
  "id": "cfg_sch_123",
  "digest": "sha256:1234567890",
  "os": "linux",
  "config_type_name": "Motion Control",
  "instance_slots": [
    {
      "key": "default",
      "name": "Default",
      "filepath": "/srv/miru/configs/v1/motion-control.json",
      "required": true
    }
  ],
  "instance_format": "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"
}

Changes

No recorded changes to this operation across all 1 revision of this API.