---
title: "Export a test session to Playwright or Cypress code"
method: POST
path: "/v1/test-sessions/{sessionId}/export"
tags: ["Testing"]
---

# Export a test session to Playwright or Cypress code

`POST /v1/test-sessions/{sessionId}/export`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/test-sessions/{sessionId}/export`
- Auth: HTTP bearer

## Path parameters

- `sessionId` string, required

## Request body

- object
  - `format` 'playwright' | 'cypress'

## Response `200`

Generated test code

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
