Skip to content

Automation API Overview

2 min read

The automation API lets CI pipelines create test runs and executions and report results programmatically. All endpoints live under /api/v1 and return JSON. The full, interactive endpoint reference — with request/response schemas and a Try It console — is the API Reference.

https://app.hawzu.com/api/v1

Every project-scoped path is …/workspace/{workspace_id}/project/{project_id}/….

Send a robot token as a bearer header on every request:

Authorization: Bearer <token>

Create a project-scoped token in the app under Access Tokens. The token carries a role per project; each endpoint states the permission it needs (e.g. create_execution, execute_test, view_execution). A token can only act on the workspace/project it is scoped to.

  1. Create a test run (POST …/create_testrun) or an execution under a release (POST …/releases/{release_id}/create_execution). Seed it from testcase_codes, testsuite_ids, and/or requirement_codes. You get back an execution_id.

  2. (Optional) Add more test cases to the run (POST …/testruns/{execution_id}/add_testcases).

  3. Submit results (POST …/executions/{execution_id}/update_results) — single or bulk, by human testcase_code.

  4. Read back the run (GET …/testruns/{execution_id}) for status_counts, or list per-case results (GET …/executions/{execution_id}/results).

Full schemas and a Try-It console for each of these are in the API Reference.

Discover and inspect test cases by their human testcase_code:

  • GET …/testcases — list the project’s test cases (filterable, see below).
  • GET …/testcase/{testcase_code} — a single test case (steps, preconditions, requirements, attachments).
  • GET …/testcase/{testcase_code}/defects — its linked defects.
  • GET …/testcase/{testcase_code}/comments — comments on the test case.
  • GET …/testcase/{testcase_code}/execution_history — how it has been executed across runs and releases.

The list endpoints are paginated like every other list endpoint.

GET …/testcases also accepts filters (combined with AND):

FilterMeaning
folderFolder name the test case lives in.
labelLabel name; repeat or comma-separate for multiple — a case must carry all given labels.
requirement_codeA linked requirement’s code (e.g. REQ-12).
priority · severity · automation_statusMatch the test case’s corresponding field.

Browse the project’s other entities — including the ids you need to seed runs and executions:

  • GET …/releases · GET …/releases/{release_id} — releases (use a release_id with create_execution).
  • GET …/testsuites · GET …/testsuites/{suite_id} — suites (use suite_ids with create_testrun); the detail returns the suite’s member testcase_codes.
  • GET …/requirements · GET …/requirement/{requirement_code} · …/requirement/{requirement_code}/testcases — requirements (filter the list by type / label) and the test cases linked to one.
  • GET …/defects · GET …/defect/{defect_code} — project defects (filter the list by status / severity).
  • GET …/labels · GET …/folders · GET …/custom-fields — reference data: the label/folder names usable in the testcases filters, and custom-field definitions to interpret custom_fields.

Releases and suites are addressed by their internal id (release_id / suite_id); requirements and defects by their human code. All lists are paginated.

Every list endpoint accepts limit (1–200, default 50) and offset (default 0) and wraps results in a uniform envelope:

{ "data": [ /* … */ ], "pagination": { "limit": 50, "offset": 0, "total": 128 } }

A test case result is always one of:

Not Executed · Passed · Failed · Blocked · Skipped

Failures return a uniform envelope. Validation failures (422) include a details array.

{ "error": { "code": "testcase_not_in_run", "message": "…", "details": [] } }
StatusMeaning
400A referenced id is unknown or not part of the run (unknown_testcase, testcase_not_in_run, …).
401Missing or invalid token.
403The token’s role lacks the endpoint’s permission.
404The run, execution, or release doesn’t exist in this project.
422The request body failed validation; see details.