Skip to content
quest'n'click

Team StudioReferenceFor authors, adminsApplies from 4.4.0

Roles and actions: the full matrix

Cette page en françaisThis page on the GitHub wiki

On a team Studio every member has one role: owner, dev or reviewer. This page lists every route of the Studio Server and the role it needs, read from the code: the gate (auth/gate.ts), the role of each API route (roleFor in http.ts), the owner's routes (auth/routes.ts) and the API's table (ops/routes.ts).

How to read it

  • The roles are ranked: reviewer < dev < owner. A route that needs dev is open to owners too.
  • The rule: a GET (and a POST that only reads, such as a check) needs a reviewer; any other write needs a dev; the members, the invitations, the audit and a few whole-game actions need an owner. The exceptions are listed in each table.
  • Below the role a route needs, the answer is 403 this needs the role <role>. A logged-in person who is not a member gets 403 not a member of this project. Without a session or a token: 401.
  • The role is checked on every request, with the session cookie (the browser) or a Bearer access token (the CLI, scripts, the MCP). A role changed or a member removed takes effect at their next request.
  • The routes below are under the Studio's public URL. The game's origin (playUrl) has its own rules, at the end.

owner

Everything a dev may do, plus: the members, their roles and sessions, invitations, the audit log; taking a span over; the exclusive lease by hand; Git push and import; the engine's upgrade; a fresh rebuild of a published build; bringing the notes in as comments; cancelling anyone's job. The last owner can be neither demoted nor removed.

dev

Writes the game, span by span: rooms, texts, values, the storyboard, the map's groupings, notes, voices, uploads and cuts, Prepare, undo and redo of their own operations, publishing a build, asking for a bisection, taking and releasing spans. Resolves any comment thread. Cancels the jobs they started.

reviewer

Reads and plays: every read of the game and of the Studio, the checks (validator, solver, lint…), the previews and builds, the live stream. Writes no game file. Comments, edits their own comments, and resolves their own threads. Holds no lease.

The game: reads and edits

Routereviewerdevowner
GET /api/game, /api/room/<id>, /api/ir, /api/graph, /api/historyyesyesyes
GET /api/storyboard, /api/groupings, /api/map, /api/notesyesyesyes
GET /api/voices, /api/voices/<lang>, /api/voices/<lang>/csv, /api/hero-matrixyesyesyes
GET /api/diff/<a>..<b>yesyesyes
GET /api/diff/<a>..<b>/captures (501 on a hosted Studio)yesyesyes
PUT /api/room/<id>/layout, /text, /value; POST /api/room/<id>/addnoyesyes
PUT /api/room/@game/value (the game's objectives)noyesyes
PUT /api/storyboard, POST /api/storyboard/markdownnoyesyes
PUT /api/groupingsnoyesyes
POST /api/notes, PUT /api/notes/<id>, DELETE /api/notes/<id>noyesyes
PUT /api/voices/<lang>/<id>noyesyes
POST /api/undo, POST /api/redo (your own operations)noyesyes

Checks and history

Routereviewerdevowner
POST /api/validate, /report, /puzzle, /coverage, /playtests, /lint, /solveyesyesyes
POST /api/screenshot (501 on a hosted Studio)yesyesyes
GET /api/revision, GET /api/ops?after=<rev>yesyesyes
POST /api/health/bisect {good, bad}noyesyes

These POSTs only read: they take their options in a body, need no lease, and are never refused for a span.

Live, presence and spans

Routereviewerdevowner
GET /api/events (the live stream)yesyesyes
POST /api/presence (the heartbeat; it also renews a dev's or owner's leases)yesyesyes
GET /api/leasesyesyesyes
POST /api/leases {spans}, POST /api/leases/release {spans?}noyesyes
POST /api/leases/takeover {span}nonoyes
POST /api/exclusive, POST /api/exclusive/releasenonoyes
POST /api/play-ticket (a browser session only, never a Bearer token)yesyesyes

Comments

Routereviewerdevowner
GET /api/comments, POST /api/commentsyesyesyes
PUT /api/comments/<id> with textown commentsown commentsown comments
PUT /api/comments/<id> with resolvedown threadsanyany
POST /api/comments/import-notesnonoyes

Only its author changes a comment's text, whatever their role (403 otherwise). There is no route to delete a comment.

Assets, jobs and builds

Routereviewerdevowner
GET /api/assets, /api/assets/prompts, /api/assets/file/<path>, /api/assets/preparedyesyesyes
POST /api/assets/sound, /decor (uploads)noyesyes
POST /api/assets/sheet, /cell, /prepare (jobs, under your exclusive lease)noyesyes
GET /api/jobs/<id>yesyesyes
POST /api/jobs/<id>/cancelnojobs they startedany job
GET /api/builds, GET /api/builds/<n>yesyesyes
POST /api/builds (publish the head)noyesyes
POST /api/builds/<n>/rebuild (rebuild fresh)nonoyes
The game's images and sounds on the Studio's origin (/assets/img/…, /assets/audio/…, /assets/video/…)yesyesyes

Members, Git and the engine

Routereviewerdevowner
GET /api/members (members and pending invitations)nonoyes
POST /api/invitations {email, role}nonoyes
PUT /api/members/<id> {role}nonoyes
DELETE /api/members/<id>nonoyes
DELETE /api/members/<id>/sessionsnonoyes
GET /api/auditnonoyes
GET /api/gityesyesyes
POST /api/git/push, POST /api/git/import {ref?}nonoyes
POST /api/engine/migratenonoyes

See Managing members, The game in Git and Upgrading the engine of a hosted game.

The remote MCP

POST /mcp takes a Bearer access token only (never the session cookie), from a member: a reviewer at least. Each tool is then a request to the same /api with the caller's token, so a tool needs the role of its route: a reviewer's agent reads and checks, a dev's agent writes. See Remote MCP.

Routes without a role

RouteWho
GET /livez, /startz, /readyzanyone (no data)
GET /metricsthe bearer of STUDIO_METRICS_TOKEN only, never a session (Health and metrics routes)
GET /.well-known/oauth-protected-resource, /.well-known/oauth-protected-resource/mcpanyone
The Studio's page and its static files (/, /assets/… other than images, sounds and video, /icons/…, /fonts/…)anyone (they hold no data)
GET /auth/login, GET /auth/callback, POST /auth/backchannel, GET /auth/clianyone
GET /auth/me, POST /auth/logoutanyone logged in, member or not (/auth/me answers role: null for a non-member)

Every /auth/… route takes 30 requests a minute per address at most; past that it answers 429 with Retry-After: 60.

The game's origin

On playUrl no Studio API and no /auth route answer. Every path needs a game session, made from a ticket that a member's browser session asked for (POST /api/play-ticket): any role. The game session lasts 15 minutes, sliding, and is checked at every request against the member's Studio session and membership. With publicBuilds: true in the configuration, /play/… and /icons/… (the published builds) open without a session, to anyone.

Refusals that are not about roles

Even with the right role, a write can be refused:

  • 423: the span is held by someone else, or the whole game is (423).
  • 409: the file changed since you read it (409), or the last owner would be demoted or removed.
  • 403 forbidden: a browser write without the exact Origin, the header X-Studio-Request: 1 and a JSON body.
  • 503 with Retry-After: the instance does not serve writes yet (a redeploy), or the identity provider has not confirmed your session for 15 minutes (suspended).
  • 429: too many refused authentications from one address in a minute (30), or a busy job queue.