Get App Url
GET /v1/sessions/app-url/{session_id}
Get the address of a web service listening on port (default 80) inside your
session's running VM. url reaches that port through the API; treat it as reachable
by anyone who has it. The response also has direct_url, an alternative per-VM
subdomain address (prefer url), vm_ip (the VM's private address, not reachable
from outside), port, vm_id, session_id, status and expires_in_seconds, the
time left before the VM's lifetime ends. To expose a port at a stable HTTPS address
with access control, use POST /v1/shares instead.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
session_id | path | string | Yes | ||
port | query | integer | No | Port to expose (1-65535) | default=80, min=1, max=65535 |
X-API-Key | header | string | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"url": {
"type": "string",
"title": "Url"
},
"direct_url": {
"type": "string",
"title": "Direct Url"
},
"vm_ip": {
"type": "string",
"title": "Vm Ip"
},
"port": {
"type": "integer",
"title": "Port"
},
"vm_id": {
"type": "string",
"title": "Vm Id"
},
"session_id": {
"type": "string",
"title": "Session Id"
},
"status": {
"type": "string",
"title": "Status"
},
"expires_in_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Expires In Seconds"
}
},
"type": "object",
"required": [
"url",
"direct_url",
"vm_ip",
"port",
"vm_id",
"session_id",
"status"
],
"title": "AppURLResponse",
"description": "Response model for app URL generation."
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
url | string | Yes | ||
direct_url | string | Yes | ||
vm_ip | string | Yes | ||
port | integer | Yes | ||
vm_id | string | Yes | ||
session_id | string | Yes | ||
status | string | Yes | ||
expires_in_seconds | integer | null | No | nullable |
400
session_id is not a valid UUID, the session has no VM yet, or its VM is not active.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the session belongs to another account.
No response body.
404
Session not found, or its VM record is missing.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |