JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const response = await client.connect.proxies.ping('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.latency);from mobilerun_sdk import Mobilerun
client = Mobilerun()
response = client.connect.proxies.ping(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.latency)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
)
func main() {
client := mobileruncloud.NewClient()
response, err := client.Connect.Proxies.Ping(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Latency)
}
mobilerun-cloud connect:proxies ping \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request GET \
--url https://api.mobilerun.ai/connect/proxies/{id}/ping<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/proxies/{id}/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.mobilerun.ai/connect/proxies/{id}/ping")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/proxies/{id}/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"latency": {
"avgMs": 123,
"jitterMs": 123,
"maxMs": 123,
"measuredAt": "2023-11-07T05:31:56Z",
"minMs": 123,
"packetLoss": 123,
"samples": 123,
"target": "<string>"
},
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}Proxies
Latency check
Returns the most recent cached network-latency measurement for the proxy, sampled periodically by connecting through the proxy to a fixed target. latency is null when no measurement is available yet (e.g. the proxy is not active, or it has not been sampled since coming online).
GET
/
connect
/
proxies
/
{id}
/
ping
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const response = await client.connect.proxies.ping('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.latency);from mobilerun_sdk import Mobilerun
client = Mobilerun()
response = client.connect.proxies.ping(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.latency)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
)
func main() {
client := mobileruncloud.NewClient()
response, err := client.Connect.Proxies.Ping(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Latency)
}
mobilerun-cloud connect:proxies ping \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request GET \
--url https://api.mobilerun.ai/connect/proxies/{id}/ping<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/proxies/{id}/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.mobilerun.ai/connect/proxies/{id}/ping")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/proxies/{id}/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"latency": {
"avgMs": 123,
"jitterMs": 123,
"maxMs": 123,
"measuredAt": "2023-11-07T05:31:56Z",
"minMs": 123,
"packetLoss": 123,
"samples": 123,
"target": "<string>"
},
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}Was this page helpful?
⌘I