Get host address for a forwarded port
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/host"
payload = { "port": 32768 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/host \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"port": 32768
}'{
"host": "localhost:32768",
"url": "https://3000-s-123.preview.nullspace.example/?edge_token=...",
"websocket_url": "wss://3000-s-123.preview.nullspace.example/?edge_token=...",
"access_token_expires_at": "2023-11-07T05:31:56Z",
"access_token_transport": "query"
}
Machines
Get host address for a forwarded port
POST
/
v1
/
machines
/
{id}
/
host
Get host address for a forwarded port
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/host"
payload = { "port": 32768 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/host \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"port": 32768
}'{
"host": "localhost:32768",
"url": "https://3000-s-123.preview.nullspace.example/?edge_token=...",
"websocket_url": "wss://3000-s-123.preview.nullspace.example/?edge_token=...",
"access_token_expires_at": "2023-11-07T05:31:56Z",
"access_token_transport": "query"
}
Body
application/json
Response
Host address and optional signed edge access URLs