Mint a desktop watch ticket for a session (BMA extension)
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream"
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.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream"
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))
}{
"type": "bma.desktop_stream",
"session_id": "<string>",
"desktop_session_id": "<string>",
"machine_id": "<string>",
"url": "<string>",
"ticket": "<string>",
"subprotocol": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
]
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}API Reference
Mint a desktop watch ticket for a session (BMA extension)
Returns a short-lived, single-use, origin-bound watch ticket and the
WebSocket endpoint of the desktop session attached to the session’s
machine. The browser connects to url with subprotocol and the
ticket; the tenant API key never reaches the browser.
GET
/
v1
/
sessions
/
{session_id}
/
desktop
/
stream
Mint a desktop watch ticket for a session (BMA extension)
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream"
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.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/v1/sessions/{session_id}/desktop/stream"
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))
}{
"type": "bma.desktop_stream",
"session_id": "<string>",
"desktop_session_id": "<string>",
"machine_id": "<string>",
"url": "<string>",
"ticket": "<string>",
"subprotocol": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
]
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Authorizations
apiKeybearer
BMA organization API key.
Headers
Project to operate in. Required when the key can read more than one
project and the deployment has no default project.
anthropic-workspace-id is accepted as an alias.
Path Parameters
Minimum string length:
1Query Parameters
Minimum string length:
1Ticket lifetime. Omit for the native default.
Required range:
15 <= x <= 120Browser origin the ticket is bound to. Defaults to the request Origin header.
Response
Desktop watch ticket.
Allowed value:
"bma.desktop_stream"WebSocket endpoint the ticket belongs to.
Single-use credential. Treat as a secret.