Get Tunnel Status Endpoint
curl --request GET \
--url https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}', 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.primeintellect.ai/api/v1/tunnel/{tunnel_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.primeintellect.ai/api/v1/tunnel/{tunnel_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.primeintellect.ai/api/v1/tunnel/{tunnel_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tunnel_id": "<string>",
"status": "pending",
"hostname": "<string>",
"url": "<string>",
"local_port": 123,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"name": "<string>",
"labels": [
"<string>"
],
"http_user": "<string>",
"auth_enabled": false,
"connected_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"team_id": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Tunnel
Get Tunnel Status Endpoint
Get status of a specific tunnel.
GET
/
api
/
v1
/
tunnel
/
{tunnel_id}
Get Tunnel Status Endpoint
curl --request GET \
--url https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}', 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.primeintellect.ai/api/v1/tunnel/{tunnel_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.primeintellect.ai/api/v1/tunnel/{tunnel_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.primeintellect.ai/api/v1/tunnel/{tunnel_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/tunnel/{tunnel_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tunnel_id": "<string>",
"status": "pending",
"hostname": "<string>",
"url": "<string>",
"local_port": 123,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"name": "<string>",
"labels": [
"<string>"
],
"http_user": "<string>",
"auth_enabled": false,
"connected_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"team_id": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Rate Limit
300 requests per 60 seconds per tunnel.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Response containing tunnel status information.
Unique tunnel identifier
Current tunnel status
Available options:
pending, connected, disconnected, expired, terminated Tunnel hostname
Full HTTPS URL
Local port forwarded by the tunnel
Tunnel creation time
Token expiration time
Owner user ID
Friendly name if set
Tunnel labels
HTTP basic auth username, if auth is enabled
Whether HTTP basic auth protects tunnel traffic
When the client connected
When the tunnel was terminated
Team ID if applicable
Was this page helpful?