Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davidG97/qa-flow/llms.txt

Use this file to discover all available pages before exploring further.

The Recording API wraps Playwright’s built-in Codegen tool, letting you capture real browser interactions and instantly convert them into importable QA Flow nodes. You can start a recording session from any URL, stop it when done, and then either retrieve the raw TypeScript code or get the interactions as structured node definitions ready to drop into a project. Alternatively, if you already have Playwright TypeScript test code, the /parse-code endpoint converts it to nodes without a live browser session.
Recording sessions use an external browser process. If you are running QA Flow inside Docker, use the interactive picker endpoints (/picker/interactive/*) rather than /record/start, which requires a display server or GUI environment.

POST /api/record/start

Start a new Playwright Codegen recording session. Opens a browser at the specified URL and begins recording all user interactions. Returns a sessionId used to reference the session in subsequent calls. Authentication required: No

Request Body

url
string
required
The starting URL the browser will navigate to when the recording session opens.

Response

sessionId
string
A unique identifier for the recording session. Pass this to all other /record/* endpoints.
curl -X POST http://localhost:3001/api/record/start \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://app.example.com"}'

GET /api/record/status/:sessionId

Check the current status of an active recording session. Authentication required: No

Path Parameters

sessionId
string
required
The session identifier returned by POST /api/record/start.

Response

sessionId
string
The session identifier.
status
string
Current state of the recording session. One of: recording, stopped.
curl http://localhost:3001/api/record/status/sess-r1s2t3

POST /api/record/stop/:sessionId

Stop an active recording session. The browser is closed and the recorded Playwright code is finalized and saved for retrieval. Authentication required: No

Path Parameters

sessionId
string
required
The session identifier to stop.

Response

A success confirmation that the session has been stopped.
curl -X POST http://localhost:3001/api/record/stop/sess-r1s2t3

GET /api/record/code/:sessionId

Retrieve the raw Playwright TypeScript code generated by the recording session. Available after the session has been stopped. Authentication required: No

Path Parameters

sessionId
string
required
The session identifier whose generated code to retrieve.

Response

code
string
The Playwright TypeScript test code captured during the recording session.
curl http://localhost:3001/api/record/code/sess-r1s2t3

GET /api/record/nodes/:sessionId

Convert the recorded session into QA Flow node definitions ready to import into a project. This is the primary endpoint for turning a recording into a reusable test flow without manually building the node graph. Authentication required: No

Path Parameters

sessionId
string
required
The session identifier whose interactions to convert to nodes.

Response

nodes
NodeDefinition[]
Array of node definition objects ready for import into a QA Flow project.
curl http://localhost:3001/api/record/nodes/sess-r1s2t3

POST /api/parse-code

Parse existing Playwright TypeScript test code into QA Flow node definitions without starting a browser session. Useful for importing existing Playwright tests you’ve written manually or copied from another source. Authentication required: No

Request Body

code
string
required
Valid Playwright TypeScript test code to parse. Must follow Playwright’s standard test(...) and page.*() API patterns.

Response

nodes
NodeDefinition[]
Array of node definition objects derived from the parsed Playwright code.
curl -X POST http://localhost:3001/api/parse-code \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "import { test, expect } from '\''@playwright/test'\'';\n\ntest('\''login test'\'', async ({ page }) => {\n  await page.goto('\''https://app.example.com'\'');\n  await page.fill('\''#email'\'', '\''admin@qaflow.com'\'');\n  await page.fill('\''#password'\'', '\''admin123'\'');\n  await page.click('\''#login-btn'\'');\n});"
  }'

GET /api/recordings

List all recording sessions stored on the server, including both active and stopped sessions. Authentication required: No

Response

An array of recording session metadata objects.
curl http://localhost:3001/api/recordings

DELETE /api/recordings/:sessionId

Delete a specific recording session and its associated data from the server. Authentication required: No

Path Parameters

sessionId
string
required
The session identifier to delete.

Response

Returns 204 No Content on success.
curl -X DELETE http://localhost:3001/api/recordings/sess-r1s2t3

DELETE /api/recordings

Delete all recording sessions and their associated data from the server. Use with caution — this operation is irreversible. Authentication required: No

Response

Returns 204 No Content on success.
curl -X DELETE http://localhost:3001/api/recordings
This endpoint deletes every recording session on the server, not just your own. Ensure no other users have active or unsaved sessions before calling this endpoint.

POST /api/recordings/cleanup

Remove stale or orphaned recording sessions — sessions where the browser process has exited or crashed but the session record was not properly cleaned up. Returns the number of sessions that were removed. Authentication required: No

Response

cleaned
number
The number of stale sessions that were removed.
curl -X POST http://localhost:3001/api/recordings/cleanup
Schedule periodic calls to /recordings/cleanup in long-running deployments to prevent orphaned browser processes from consuming server memory.

Build docs developers (and LLMs) love