Test Case Export API
The export endpoint downloads a project’s active (non-archived) test cases as a single artifact. It supports four formats and three scope options, so an integrator can pull an entire project, one suite subtree, or the exact filtered slice a user is looking at in the repository view.
The endpoint is read-only — it emits no audit events and makes no state changes. Attachments (step images, defect evidence, etc.) are never included in any exported format; only text, tags, custom field values, and suite structure travel with the artifact.
All requests require an authenticated request (Bearer API token or session cookie) with at least member role in the project’s organization. Viewers receive 403 forbidden.
Export test cases
Section titled “Export test cases”/api/v1/projects/{projectId}/exports{projectId} is the project code (for example ACME).
Query parameters
Section titled “Query parameters”| Parameter | Default | Notes |
|---|---|---|
format | — | Required. One of json, xml, csv, xlsx. An unlisted value returns 422 validation_failed. |
scope | project | project (the whole project), suite (the suite given by suite, plus all of its descendant suites), or filtered (the server re-evaluates q/cf — see below). |
suite | — | Suite ULID. Required when scope=suite; ignored otherwise. An unresolvable suite ULID returns 404 not_found. |
q | — | Substring filter, applied only when scope=filtered. Same substring-match contract as the test case search endpoint. |
cf | — | Repeatable custom-field filter, applied only when scope=filtered. Each entry is <fieldUlid>:<value[,value…]> — identical contract to the search/list endpoints. |
Response
Section titled “Response”200 with the artifact body in the requested format. The response always carries a matching Content-Type and a Content-Disposition: attachment header naming the file <projectId>-export.<extension>:
format | Content-Type | Extension |
|---|---|---|
json | application/json | .json |
xml | application/xml | .xml |
csv | text/csv | .csv |
xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx |
Every format carries the same underlying data: for each active test case, its title, description, tags, suite path, steps, and full custom field values (fixed fields — priority/type/status — plus every custom field configured on the project). CSV and XLSX cells that begin with =, +, -, @, a tab, or a carriage return are prefixed with a leading ' to neutralize spreadsheet formula injection — this is visible if you open the file in a spreadsheet application.
Size ceiling
Section titled “Size ceiling”An export is bounded to EXPORT_MAX_CASES (5000) active cases per request. When the resolved scope would exceed this ceiling, the request fails before any row is read or serialized:
{ "error": { "code": "too_many_cases", "message": "..." } }Narrow the scope (a smaller suite, or a filtered scope with q/cf) and retry.
Rate limit
Section titled “Rate limit”Export requests are rate-limited per organization. Exceeding the limit returns 429 with { "error": { "code": "too_many_requests", ... } }. Back off and retry after a short delay.
Errors
Section titled “Errors”| Status | Code | Condition |
|---|---|---|
403 | forbidden | The caller’s role is viewer |
404 | not_found | projectId does not exist in the active organization, or scope=suite references a suite ULID that does not exist in this project |
422 | validation_failed | format is missing or not one of the four listed values, or scope=suite is set without suite |
422 | too_many_cases | The resolved scope exceeds EXPORT_MAX_CASES |
429 | too_many_requests | The organization’s export rate limit was exceeded |
Re-importing an export
Section titled “Re-importing an export”Every file this endpoint produces — JSON, XML, CSV, or XLSX — round-trips back in through the two-step import API: POST /api/v1/projects/{projectId}/imports:stage to stage the file, then POST /api/v1/projects/{projectId}/imports/commit with the matching probara_json/probara_xml/probara_csv/probara_xlsx source format — a full round trip for backing up and restoring, or migrating cases between projects. Because attachments are never exported, a re-imported case never carries its original step images; everything else (title, description, tags, suite path, steps, and custom field values) round-trips.
Example
Section titled “Example”Export a whole project as CSV:
curl -sS \ -H "Authorization: Bearer $PROBARA_API_TOKEN" \ -o acme-export.csv \ "https://probara.net/api/v1/projects/ACME/exports?format=csv"Export one suite subtree (including its descendants) as XLSX:
curl -sS \ -H "Authorization: Bearer $PROBARA_API_TOKEN" \ -o acme-suite-export.xlsx \ "https://probara.net/api/v1/projects/ACME/exports?format=xlsx&scope=suite&suite=01JAAAA..."Export the filtered slice matching a search query as JSON:
curl -sS \ -H "Authorization: Bearer $PROBARA_API_TOKEN" \ -o acme-filtered-export.json \ "https://probara.net/api/v1/projects/ACME/exports?format=json&scope=filtered&q=login"Related pages
Section titled “Related pages”- Test case search API — the same
q/cffilter contract used byscope=filtered. - Test case import API — re-imports the files this endpoint produces, with full fidelity for Probara re-imports.