List public URLs
curl --request GET \
--url https://api.void-run.com/api/sandboxes/{id}/public-urls \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.void-run.com/api/sandboxes/{id}/public-urls"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.void-run.com/api/sandboxes/{id}/public-urls', 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.void-run.com/api/sandboxes/{id}/public-urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.void-run.com/api/sandboxes/{id}/public-urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.void-run.com/api/sandboxes/{id}/public-urls")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.void-run.com/api/sandboxes/{id}/public-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Public URLs fetched",
"data": [
{
"port": 8080,
"url": "https://sabcdef12-8080.sb.void-run.com"
}
]
}{
"error": "Invalid request",
"details": "Additional error details"
}{
"error": "Invalid request",
"details": "Additional error details"
}Sandboxes
List public URLs
Return every published port for the sandbox along with its stable public HTTPS URL served by the gateway. Ports appear here as soon as they are declared via publishPorts, even before the gateway has finished materialising the route.
GET
/
sandboxes
/
{id}
/
public-urls
List public URLs
curl --request GET \
--url https://api.void-run.com/api/sandboxes/{id}/public-urls \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.void-run.com/api/sandboxes/{id}/public-urls"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.void-run.com/api/sandboxes/{id}/public-urls', 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.void-run.com/api/sandboxes/{id}/public-urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.void-run.com/api/sandboxes/{id}/public-urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.void-run.com/api/sandboxes/{id}/public-urls")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.void-run.com/api/sandboxes/{id}/public-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Public URLs fetched",
"data": [
{
"port": 8080,
"url": "https://sabcdef12-8080.sb.void-run.com"
}
]
}{
"error": "Invalid request",
"details": "Additional error details"
}{
"error": "Invalid request",
"details": "Additional error details"
}⌘I

