Calibrations
Create
Report a calibration to Miru.
POST
/
calibrations
curl (Linux)
curl \
--unix-socket /run/miru/miru.sock \
--request POST \
--url http://localhost/v0.3/calibrations \
--header 'Content-Type: application/json' \
--data '{
"component": "kuka-arm",
"serial_number": "SN-1234",
"content": {"format": "json", "data": "{\"x\": 0.12, \"y\": -0.03}"}
}'$api = Get-Content -Raw "$env:ProgramData\Miru\device-api\device-api.json" | ConvertFrom-Json; `
$body = @{
component = "kuka-arm"
serial_number = "SN-1234"
content = @{ format = "json"; data = '{"x": 0.12, "y": -0.03}' }
} | ConvertTo-Json -Depth 3; `
Invoke-RestMethod -Method Post `
-Uri "http://127.0.0.1:$($api.port)/v0.3/calibrations" `
-Headers @{ Authorization = "Bearer $($api.token)" } `
-ContentType "application/json" `
-Body $bodyimport requests
url = "http://localhost/v0.3/calibrations"
payload = {
"component": "kuka-arm",
"content": {
"format": "json",
"data": "{
\"enable_autonomy\": true,
\"enable_remote_control\": true,
\"max_payload_kg\": 10.0
}
"
},
"serial_number": "SN-1234",
"reported_by": "Benjamin Smidt"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
component: 'kuka-arm',
content: {
format: 'json',
data: '{\n "enable_autonomy": true,\n "enable_remote_control": true,\n "max_payload_kg": 10.0\n}\n'
},
serial_number: 'SN-1234',
reported_by: 'Benjamin Smidt'
})
};
fetch('http://localhost/v0.3/calibrations', 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 => "http://localhost/v0.3/calibrations",
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([
'component' => 'kuka-arm',
'content' => [
'format' => 'json',
'data' => '{
"enable_autonomy": true,
"enable_remote_control": true,
"max_payload_kg": 10.0
}
'
],
'serial_number' => 'SN-1234',
'reported_by' => 'Benjamin Smidt'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost/v0.3/calibrations"
payload := strings.NewReader("{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost/v0.3/calibrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v0.3/calibrations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}"
response = http.request(request)
puts response.read_body{
"report_id": "0b6f3c2e-6a51-4e0f-9a43-2f1d7c9e8b10",
"reported_at": "2026-03-10T12:00:00Z"
}Authorizations
Body
application/json
Response
200 - application/json
The agent saved the calibration and will upload it to Miru.
⌘I
curl (Linux)
curl \
--unix-socket /run/miru/miru.sock \
--request POST \
--url http://localhost/v0.3/calibrations \
--header 'Content-Type: application/json' \
--data '{
"component": "kuka-arm",
"serial_number": "SN-1234",
"content": {"format": "json", "data": "{\"x\": 0.12, \"y\": -0.03}"}
}'$api = Get-Content -Raw "$env:ProgramData\Miru\device-api\device-api.json" | ConvertFrom-Json; `
$body = @{
component = "kuka-arm"
serial_number = "SN-1234"
content = @{ format = "json"; data = '{"x": 0.12, "y": -0.03}' }
} | ConvertTo-Json -Depth 3; `
Invoke-RestMethod -Method Post `
-Uri "http://127.0.0.1:$($api.port)/v0.3/calibrations" `
-Headers @{ Authorization = "Bearer $($api.token)" } `
-ContentType "application/json" `
-Body $bodyimport requests
url = "http://localhost/v0.3/calibrations"
payload = {
"component": "kuka-arm",
"content": {
"format": "json",
"data": "{
\"enable_autonomy\": true,
\"enable_remote_control\": true,
\"max_payload_kg\": 10.0
}
"
},
"serial_number": "SN-1234",
"reported_by": "Benjamin Smidt"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
component: 'kuka-arm',
content: {
format: 'json',
data: '{\n "enable_autonomy": true,\n "enable_remote_control": true,\n "max_payload_kg": 10.0\n}\n'
},
serial_number: 'SN-1234',
reported_by: 'Benjamin Smidt'
})
};
fetch('http://localhost/v0.3/calibrations', 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 => "http://localhost/v0.3/calibrations",
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([
'component' => 'kuka-arm',
'content' => [
'format' => 'json',
'data' => '{
"enable_autonomy": true,
"enable_remote_control": true,
"max_payload_kg": 10.0
}
'
],
'serial_number' => 'SN-1234',
'reported_by' => 'Benjamin Smidt'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost/v0.3/calibrations"
payload := strings.NewReader("{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost/v0.3/calibrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v0.3/calibrations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component\": \"kuka-arm\",\n \"content\": {\n \"format\": \"json\",\n \"data\": \"{\\n \\\"enable_autonomy\\\": true,\\n \\\"enable_remote_control\\\": true,\\n \\\"max_payload_kg\\\": 10.0\\n}\\n\"\n },\n \"serial_number\": \"SN-1234\",\n \"reported_by\": \"Benjamin Smidt\"\n}"
response = http.request(request)
puts response.read_body{
"report_id": "0b6f3c2e-6a51-4e0f-9a43-2f1d7c9e8b10",
"reported_at": "2026-03-10T12:00:00Z"
}
