Devices
Ping
Ping a device to check connectivity.
POST
/
devices
/
{device_id}
/
ping
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
)
response = client.devices.ping(
device_id="dvc_123",
timeout_nanos=1000000000,
)
print(response.code)curl --request POST \
--url https://api.mirurobotics.com/beta/devices/{device_id}/ping \
--header 'Content-Type: application/json' \
--header 'Miru-Version: <miru-version>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"timeout_nanos": 1000000000
}
'const options = {
method: 'POST',
headers: {
'Miru-Version': '<miru-version>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({timeout_nanos: 1000000000})
};
fetch('https://api.mirurobotics.com/beta/devices/{device_id}/ping', 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/devices/{device_id}/ping",
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([
'timeout_nanos' => 1000000000
]),
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/devices/{device_id}/ping"
payload := strings.NewReader("{\n \"timeout_nanos\": 1000000000\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/devices/{device_id}/ping")
.header("Miru-Version", "<miru-version>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeout_nanos\": 1000000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mirurobotics.com/beta/devices/{device_id}/ping")
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 \"timeout_nanos\": 1000000000\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"round_trip_nanos": 1000000000
}| Scope | Required |
|---|---|
devices:read | Yes |
Authorizations
The API key to use for authentication.
Headers
The API version the client was built against.
Example:
"2026-05-06.rainier"
Path Parameters
The unique identifier of the device.
Example:
"dvc_123"
Body
application/json
The timeout in nanoseconds to wait for the ping operation to complete. The maximum timeout is 10 seconds.
Example:
1000000000
Response
200 - application/json
Successfully pinged the device.
Last modified on May 27, 2026
⌘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
)
response = client.devices.ping(
device_id="dvc_123",
timeout_nanos=1000000000,
)
print(response.code)curl --request POST \
--url https://api.mirurobotics.com/beta/devices/{device_id}/ping \
--header 'Content-Type: application/json' \
--header 'Miru-Version: <miru-version>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"timeout_nanos": 1000000000
}
'const options = {
method: 'POST',
headers: {
'Miru-Version': '<miru-version>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({timeout_nanos: 1000000000})
};
fetch('https://api.mirurobotics.com/beta/devices/{device_id}/ping', 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/devices/{device_id}/ping",
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([
'timeout_nanos' => 1000000000
]),
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/devices/{device_id}/ping"
payload := strings.NewReader("{\n \"timeout_nanos\": 1000000000\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/devices/{device_id}/ping")
.header("Miru-Version", "<miru-version>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeout_nanos\": 1000000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mirurobotics.com/beta/devices/{device_id}/ping")
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 \"timeout_nanos\": 1000000000\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"round_trip_nanos": 1000000000
}
