View Open
curl --request POST \
--url https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/openimport requests
url = "https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open', 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.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyWorkspaces
View Open
POST /v0/workspaces/:id/sessions/:sessionId/view/open — Ask the paired tab to open an artifact
POST
/
v0
/
workspaces
/
{id}
/
sessions
/
{sessionId}
/
view
/
open
View Open
curl --request POST \
--url https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/openimport requests
url = "https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open', 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.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/workspaces/{id}/sessions/{sessionId}/view/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAsks the browser tab paired to this session to open an artifact. Only the latest request per tab is kept: a new request supersedes a queued or deferred one. Repeating the same
Content writes never navigate anyone, and nothing here can discard a draft.
operationId returns the stored receipt. Access is checked when the request is queued and again when the browser applies it. Requires a live session and navigate (any member). MCP: workspace_view_open. CLI: rip workspace view open <workspace-id> <session-id> <artifact-id> --operation-id --expected-context-generation.
Auth: Authorization: Bearer tr_... (an account API key). {id} and {sessionId} are UUIDs.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
artifactId | string | Yes | Id, public id, or alias of an artifact in this workspace that you can read |
expectedContextGeneration | integer | Yes | The contextGeneration from View Context (≥ 1) |
operationId | string | Yes | Stable retry identity, 1–255 characters |
Response (201)
{ "ok": true, "data": { "operationId": "…", "navigationGeneration": 4, "pairGeneration": 1, "expectedContextGeneration": 12, "status": "queued", "artifactId": "<public id>" } }
status | Meaning |
|---|---|
queued | The tab is following and has no unsaved edits; it opens the artifact on its next poll |
deferred | Stored but not applied: the person is editing or has paused following (reason: "paused_or_dirty"), or the context moved on (reason: "stale_context"). The tab offers an Open action |
applied | The browser opened the artifact |
disconnected | No tab is paired to the session (reason: "no_paired_view", with artifactId: null) |
Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_WORKSPACE_VIEW | Missing or malformed artifactId, operationId, or expectedContextGeneration |
404 | ARTIFACT_NOT_FOUND | No such artifact in this workspace |
403 | WORKSPACE_ARTIFACT_FORBIDDEN | You cannot read that artifact |
409 | WORKSPACE_NAVIGATION_OPERATION_CONFLICT | This operationId was already used with a different artifact or expectedContextGeneration |
403 | WORKSPACE_SESSION_INVALID | The session is not yours, on this API key, in this workspace |
403 | WORKSPACE_SESSION_REVOKED | Your workspace access was removed |
409 | WORKSPACE_SESSION_EXPIRED / WORKSPACE_SESSION_INACTIVE | The session expired after 24 hours idle / has ended |
409 | WORKSPACE_ARCHIVED | The workspace is archived |