curl --request POST \
--url https://pria.praxislxp.com/api/user/agents/workspace/ticket \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"workspaceId": "pria-ws-7a3f9"
}
'import requests
url = "https://pria.praxislxp.com/api/user/agents/workspace/ticket"
payload = { "workspaceId": "pria-ws-7a3f9" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: 'pria-ws-7a3f9'})
};
fetch('https://pria.praxislxp.com/api/user/agents/workspace/ticket', 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://pria.praxislxp.com/api/user/agents/workspace/ticket",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 'pria-ws-7a3f9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/agents/workspace/ticket"
payload := strings.NewReader("{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/agents/workspace/ticket")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/agents/workspace/ticket")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workspaceId": "<string>",
"vncUrl": "wss://pria.praxislxp.com/api/agents/workspace/vnc/pria-ws-7a3f9?ticket=eyJhbGciOi...",
"vncPassword": "<string>",
"expiresInSec": 60
}{
"success": false,
"message": "workspaceId is required"
}{
"success": false,
"message": "Workspace not ready"
}Issue a short-lived ticket for the caller's KasmVNC desktop
Mints a single-use, 60-second JWT ticket the browser uses to open a
WebSocket to the in-band desktop proxy at
/api/agents/workspace/vnc/<workspaceId>. The endpoint enforces:
- Sec-Fetch-Site: same-origin only — cross-site invocation is rejected.
- Per-user rate limiting via
createWorkspaceTicketLimiter()(keyed onreq.user._id; IP only as fallback for unauthenticated requests). - Ownership: the workspace must belong to the caller and be in
status: 'ready'.
The returned vncPassword is the RFB-protocol password KasmVNC requires
during the WebSocket handshake (separate from the HTTP Basic auth the
proxy applies server-side). Both the ticket and the password are
short-lived; obtain a fresh pair for each desktop session.
This route is not super-only — it is mounted under
/api/agents/workspace ahead of the super gate that fronts the rest
of /api/agents/*.
curl --request POST \
--url https://pria.praxislxp.com/api/user/agents/workspace/ticket \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"workspaceId": "pria-ws-7a3f9"
}
'import requests
url = "https://pria.praxislxp.com/api/user/agents/workspace/ticket"
payload = { "workspaceId": "pria-ws-7a3f9" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: 'pria-ws-7a3f9'})
};
fetch('https://pria.praxislxp.com/api/user/agents/workspace/ticket', 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://pria.praxislxp.com/api/user/agents/workspace/ticket",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 'pria-ws-7a3f9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/agents/workspace/ticket"
payload := strings.NewReader("{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/agents/workspace/ticket")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/agents/workspace/ticket")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"pria-ws-7a3f9\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workspaceId": "<string>",
"vncUrl": "wss://pria.praxislxp.com/api/agents/workspace/vnc/pria-ws-7a3f9?ticket=eyJhbGciOi...",
"vncPassword": "<string>",
"expiresInSec": 60
}{
"success": false,
"message": "workspaceId is required"
}{
"success": false,
"message": "Workspace not ready"
}Authorizations
JWT token passed in x-access-token header
Body
Caller's own workspace runtime id (matches
agent.workspace.runtime.workspaceId returned by
GET /api/user/agents/workspace/me). The endpoint only issues
tickets for a workspace owned by req.user._id and in
status: 'ready'.
"pria-ws-7a3f9"
Response
Ticket issued.
true
Echo of the validated workspace id.
Fully-qualified WebSocket URL (ws:// or wss://, matching the
current request scheme) that the browser opens to reach the
KasmVNC desktop. Includes the single-use ticket query param.
"wss://pria.praxislxp.com/api/agents/workspace/vnc/pria-ws-7a3f9?ticket=eyJhbGciOi..."
RFB-protocol password required by KasmVNC during the WebSocket handshake. This is in addition to the HTTP Basic auth handled server-side by the proxy. The browser never persists it — single use per RFB handshake for the lifetime of the ticket.
Ticket TTL in seconds (currently fixed at 60).
60
Was this page helpful?