Workbench API

Projects, notebooks, events, dispatch, trust, and rewind endpoints.

Workbench API

The Workbench API provides access to the event-sourced MDM surface — projects, notebooks, tool dispatch, trust gates, and rewind/fork capabilities.

Scopes

GET/api/workbench/scopesAUTH

List available scopes for project creation.

Response

[
  { "scope_type": "workspace", "scope_id": "ws_01", "name": "Default Workspace" },
  { "scope_type": "team", "scope_id": "team_01", "name": "Data Engineering" }
]

Projects

GET/api/workbench/projectsAUTH

List all projects for the authenticated user.

Response

[
  {
    "id": "proj_01",
    "name": "Q1 Customer Dedup",
    "scope_type": "workspace",
    "scope_id": "ws_01",
    "default_trust": "gated",
    "active_notebook_id": "nb_01",
    "created_at": "2026-04-01T09:00:00Z"
  }
]
POST/api/workbench/projectsAUTH

Create a new project.

Request

{
  "name": "Q1 Customer Dedup",
  "scope_type": "workspace",
  "scope_id": "ws_01",
  "default_trust": "gated"
}
FieldTypeRequiredDescription
namestringYesProject display name
scope_typestringYesworkspace, team, or org
scope_idstringYesID of the scope
default_truststringNoDefault trust level for new notebooks (auto, gated, confirm). Defaults to gated.

Response 201 Created

Returns the created project object.

Notebooks

GET/api/workbench/notebooks?project_id={id}AUTH

List notebooks for a project.

Response

[
  {
    "id": "nb_01",
    "project_id": "proj_01",
    "name": "Initial run",
    "trust_level": "gated",
    "event_count": 42,
    "created_at": "2026-04-01T09:05:00Z"
  }
]
POST/api/workbench/notebooksAUTH

Create a new notebook within a project.

Request

{
  "project_id": "proj_01",
  "name": "Experiment A"
}

Response 201 Created

Returns the created notebook object.

Events

GET/api/workbench/notebooks/{id}/eventsAUTH

Retrieve the full event log for a notebook. Events are returned in sequence order.

Response

[
  {
    "seq": 1,
    "type": "tool_call",
    "tool_name": "goldencheck",
    "params": { "source_id": "src_01" },
    "result": { "issues_found": 12 },
    "created_at": "2026-04-01T09:10:00Z"
  }
]

Dispatch

POST/api/workbench/notebooks/{id}/dispatchAUTH

Dispatch a tool call against the active notebook. The call is subject to the notebook's trust gate.

Request

{
  "tool_name": "goldenmatch",
  "params": {
    "source_id": "src_01",
    "threshold": 0.8
  }
}
FieldTypeRequiredDescription
tool_namestringYesRegistered MCP tool name
paramsobjectYesTool-specific parameters

Response

{
  "seq": 43,
  "type": "tool_call",
  "tool_name": "goldenmatch",
  "gate_action": "auto",
  "result": { "scored_pairs": 120, "cluster_count": 34 }
}

Errors

StatusMeaning
403 ForbiddenTrust gate rejected the call (requires higher trust level)
404 Not FoundNotebook not found
409 ConflictNotebook is not the active notebook for its project
422 Unprocessable EntityUnknown tool name or invalid params

Trust

PUT/api/workbench/notebooks/{id}/trustAUTH

Update the trust level for a notebook.

Request

{
  "trust_level": "auto"
}
FieldTypeRequiredDescription
trust_levelstringYesOne of auto, gated, or confirm

Response

{
  "id": "nb_01",
  "trust_level": "auto"
}

Rewind

POST/api/workbench/notebooks/{id}/rewindAUTH

Rewind a notebook to a previous event sequence number. All events after the target seq are soft-deleted.

Request

{
  "seq": 10
}
FieldTypeRequiredDescription
seqintegerYesSequence number to rewind to

Response

{
  "notebook_id": "nb_01",
  "rewound_to": 10,
  "events_removed": 32
}

Errors

StatusMeaning
404 Not FoundNotebook not found
422 Unprocessable EntityInvalid sequence number

Fork

POST/api/workbench/notebooks/{id}/forkAUTH

Fork a notebook at a given sequence number, creating a new notebook with events up to that point.

Request

{
  "at_seq": 10,
  "name": "Experiment B"
}
FieldTypeRequiredDescription
at_seqintegerYesSequence number to fork at
namestringYesName for the new notebook

Response 201 Created

{
  "id": "nb_02",
  "forked_from": "nb_01",
  "at_seq": 10,
  "name": "Experiment B"
}

Squash

POST/api/workbench/notebooks/{id}/events/{eventId}/squashAUTH

Squash an event, collapsing it into the preceding event.

Response

{
  "notebook_id": "nb_01",
  "squashed_event_id": "evt_43",
  "new_event_count": 41
}

Errors

StatusMeaning
404 Not FoundNotebook or event not found
409 ConflictEvent cannot be squashed (e.g. first event)