Config Types
Create
Create a new config type.
POST
/
config_types
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_type = client.config_types.create(
name="My Config Type",
slug="my-config-type",
)
print(config_type.id)curl --request POST \
--url https://api.mirurobotics.com/beta/config_types \
--header 'Content-Type: application/json' \
--header 'Miru-Version: <miru-version>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Config Type",
"slug": "my-config-type"
}
'const options = {
method: 'POST',
headers: {
'Miru-Version': '<miru-version>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'My Config Type', slug: 'my-config-type'})
};
fetch('https://api.mirurobotics.com/beta/config_types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mirurobotics.com/beta/config_types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Config Type',
'slug' => 'my-config-type'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Miru-Version: <miru-version>",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mirurobotics.com/beta/config_types"
payload := strings.NewReader("{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Miru-Version", "<miru-version>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mirurobotics.com/beta/config_types")
.header("Miru-Version", "<miru-version>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mirurobotics.com/beta/config_types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Miru-Version"] = '<miru-version>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}| Scope | Required |
|---|---|
config_types:write | Yes |
Authorizations
The API key to use for authentication.
Headers
The API version the client was built against.
Example:
"2026-05-06.rainier"
Body
application/json
Response
200 - application/json
Successfully created the config type.
The object type, which is always config_type.
Available options:
config_type Example:
"config_type"
ID of the config type.
Example:
"cfg_123"
Name of the config type.
Example:
"My Config Type"
An immutable, code-friendly name for the config type.
Example:
"my-config-type"
Timestamp of when the config type was created.
Example:
"2021-01-01T00:00:00Z"
Timestamp of when the config type was last updated.
Example:
"2021-01-01T00:00:00Z"
⌘I
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_type = client.config_types.create(
name="My Config Type",
slug="my-config-type",
)
print(config_type.id)curl --request POST \
--url https://api.mirurobotics.com/beta/config_types \
--header 'Content-Type: application/json' \
--header 'Miru-Version: <miru-version>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Config Type",
"slug": "my-config-type"
}
'const options = {
method: 'POST',
headers: {
'Miru-Version': '<miru-version>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'My Config Type', slug: 'my-config-type'})
};
fetch('https://api.mirurobotics.com/beta/config_types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mirurobotics.com/beta/config_types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Config Type',
'slug' => 'my-config-type'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Miru-Version: <miru-version>",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mirurobotics.com/beta/config_types"
payload := strings.NewReader("{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Miru-Version", "<miru-version>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mirurobotics.com/beta/config_types")
.header("Miru-Version", "<miru-version>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mirurobotics.com/beta/config_types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Miru-Version"] = '<miru-version>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Config Type\",\n \"slug\": \"my-config-type\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
