Workspaces

Run a read-only SQL query over session transcripts.

Runs a single read-only SQL SELECT statement over session transcripts and returns the matching rows. The view covers only the workspaces in your organization that you can access: those shared with the whole organization plus any private workspaces shared with you.

Queries may ONLY read from the view session_transcripts_view; every other table, view, and function is off-limits. Query it like a table, e.g. SELECT ... FROM session_transcripts_view. Its columns are:

  • session_id (text): ID of the session (chat).
  • workspace_id (text): ID of the workspace the session belongs to.
  • transcript (text): concise plain-text transcript of the session's conversation.
  • session_title (text, nullable): title of the session.
  • agent_type (text, nullable): agent that ran the session, e.g. 'claude' or 'codex'.
  • model (text, nullable): model the session used.
  • workspace_name (text, nullable): display name of the workspace.
  • workspace_state (text): workspace lifecycle state, e.g. 'ready' or 'archived'.
  • repo_url (text): git remote URL of the workspace's repository.
  • session_created_at (timestamptz): when the session was created.
  • transcript_updated_at (timestamptz): when the transcript last changed.
  • workspace_created_at (timestamptz): when the workspace was created.
  • workspace_creator_id (text, nullable): ID of the user who created the workspace; matches the user id from GET /me for scoping "my" queries.
  • workspace_creator_name (text, nullable): display name of the workspace creator (their email when no name is set).

Limits: at most 500 rows are returned (the response sets truncated: true when the query matched more), statements time out after 5 seconds, and the query text may be at most 10000 characters. The statement must be a single query: semicolon-chained statements, writes, U& Unicode-escape syntax, and queries containing the text set_config anywhere (even inside a search string) are rejected. Errors come back as 400s carrying the Postgres error message.

Example queries:

  • Search transcripts: SELECT session_id, session_title, workspace_name FROM session_transcripts_view WHERE transcript ILIKE '%database migration%' ORDER BY transcript_updated_at DESC LIMIT 20
  • Recent sessions in live workspaces: SELECT session_title, workspace_name, transcript_updated_at FROM session_transcripts_view WHERE workspace_state = 'ready' ORDER BY transcript_updated_at DESC LIMIT 50
post/v0/sql

Request

  • Base URL
    https://api.conductor.build (the document declares no server; this is the origin it was published from)
  • URL
    https://api.conductor.build/v0/sql
  • Auth
    HTTP bearer

Request body

querystring required

Response

Default Response

rowsobject[] required
rowCountnumber required
truncatedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.