AI Test Authoring API¶
These endpoints drive AI Authoring: create a requirement in plain language, let AI draft a test case, approve it, and follow the feedback from its runs. Drafting is asynchronous: start it, then poll the requirement.
Create a requirement¶
Role: Standard and above.
name (1-255 characters) and description (the requirement in plain language) are required. devices lists the Mobile Device IDs the test may use; leave it out to let AI choose from the active devices.
Request body *
{ "name": "string", "description": "string", "devices": [ 0 ], "generate": true }
Responses
| Code | Description |
|---|---|
| 201 |
The requirement was created. Media type: application/json Example Value: { "id": 0 } |
| 202 |
The requirement was created and drafting has started ( Media type: application/json Example Value: { "id": 0 } |
List requirements¶
Role: Guest and above.
Parameters
| Name | Description |
|---|---|
| page | Zero-based page number. Default 0. Type: integer (query) |
| size | Page size. Default 20. Type: integer (query) |
| sort | <field>,asc or <field>,desc.Type: string (query) |
| filterName | Filter type, for example text.Type: string (query) |
| filterValue | The filter value. Type: string (query) |
Responses
| Code | Description |
|---|---|
| 200 |
A page of requirements. Media type: application/json Example Value: { "content": [ { "id": 0, "name": "string", "description": "string", "devices": [ 0 ], "created": "string", "updated": "string", "feedbackStatus": "NONE", "testCaseId": null, "generation": { "status": "DONE", "code": "string", "reason": "string", "startedAt": "2026-09-23T10:00:00Z", "finishedAt": "2026-09-23T10:01:30Z" }, "pendingSuggestion": { "id": 0, "requirementId": 0, "status": "PENDING", "current": true, "payload": { }, "created": "string", "updated": "string" } } ], "totalElements": 0, "totalPages": 0, "number": 0, "size": 20 } |
Get a requirement¶
Role: Guest and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
The requirement. Media type: application/json Example Value: { "id": 0, "name": "string", "description": "string", "devices": [ 0 ], "created": "string", "updated": "string", "feedbackStatus": "NONE", "testCaseId": null, "generation": { "status": "DONE", "code": "string", "reason": "string", "startedAt": "2026-09-23T10:00:00Z", "finishedAt": "2026-09-23T10:01:30Z" }, "pendingSuggestion": { "id": 0, "requirementId": 0, "status": "PENDING", "current": true, "payload": { }, "created": "string", "updated": "string" } } |
| 404 |
The requirement does not exist. |
Update a requirement¶
Role: Standard and above.
name (1-255 characters) and description (the requirement in plain language) are required. devices lists the Mobile Device IDs the test may use; leave it out to let AI choose from the active devices.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Request body *
{ "name": "string", "description": "string", "devices": [ 0 ], "generate": true }
Responses
| Code | Description |
|---|---|
| 200 |
The requirement was updated. |
| 404 |
The requirement does not exist. |
Delete a requirement¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
The requirement and its suggestions were deleted. An approved test case stays. |
| 404 |
The requirement does not exist. |
Delete all requirements¶
Role: Standard and above.
Responses
| Code | Description |
|---|---|
| 200 |
Every requirement and its suggestions were deleted. |
Draft a test case (suggest)¶
Role: Standard and above.
This is also the re-suggest call: it replaces a pending draft (approved ones stay) and takes unresolved test-defect feedback into account. The optional body limits the devices.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Request body
{ "devices": [ 0 ] }
Responses
| Code | Description |
|---|---|
| 202 |
Drafting has started. Poll GET /api/v2/requirements/{id} until Media type: application/json Example Value: { "id": 0, "name": "string", "description": "string", "devices": [ 0 ], "created": "string", "updated": "string", "feedbackStatus": "NONE", "testCaseId": null, "generation": { "status": "DONE", "code": "string", "reason": "string", "startedAt": "2026-09-23T10:00:00Z", "finishedAt": "2026-09-23T10:01:30Z" }, "pendingSuggestion": { "id": 0, "requirementId": 0, "status": "PENDING", "current": true, "payload": { }, "created": "string", "updated": "string" } } |
| 409 |
A draft is already being generated for this requirement. |
| 429 |
The daily AI limit is reached or the service is busy. See |
| 404 |
The requirement does not exist. |
List suggestions¶
Role: Guest and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
All suggestions of the requirement. Media type: application/json Example Value:
[
{
"id": 0,
"requirementId": 0,
"status": "PENDING",
"current": true,
"payload": {
},
"created": "string",
"updated": "string"
}
]
|
| 404 |
The requirement does not exist. |
Approve a suggestion¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
| suggestionId * | Numeric ID of the suggestion. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 201 |
A test case was created (first approval). Media type: application/json Example Value: { "id": 0, "created": true } |
| 200 |
The existing test case was updated in place (approval after a re-suggest). Media type: application/json Example Value: { "id": 0, "created": false } |
| 409 |
Another test case already has this name, or the suggestion is not pending. |
| 404 |
The requirement does not exist. |
Discard a suggestion¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
| suggestionId * | Numeric ID of the suggestion. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
The suggestion is marked |
| 404 |
The requirement does not exist. |
Delete a suggestion¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
| suggestionId * | Numeric ID of the suggestion. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
The suggestion was deleted, whatever its status. |
| 404 |
The requirement does not exist. |
Clear old versions¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
Superseded approvals and discarded drafts were deleted; the current suggestion stays. |
| 404 |
The requirement does not exist. |
List feedback¶
Role: Guest and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
The Run & Feedback history of the requirement's test case, newest first. Media type: application/json Example Value:
[
{
"id": 0,
"requirementId": 0,
"testCaseId": 0,
"executionId": 0,
"verdict": "AUTHORING_DEFECT",
"rationale": "string",
"suggestedChange": "string",
"analysis": {
},
"resolved": false,
"occurrenceCount": 1,
"lastOccurredAt": "string",
"created": "string"
}
]
|
| 404 |
The requirement does not exist. |
Mark a requirement done¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
Feedback is no longer generated for the test case's runs. The test case itself stays live. |
| 404 |
The requirement does not exist. |
Reopen a requirement¶
Role: Standard and above.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the requirement. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
Feedback generation resumes for the test case's runs. |
| 404 |
The requirement does not exist. |