Skip to content

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

/api/v2/requirements 📋 Copied! ▼

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 (generate: true). Poll the requirement (the Location header) until generation.status is final.

Media type: application/json

Example Value:

{
"id": 0
}

List requirements

/api/v2/requirements 📋 Copied! ▼

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

/api/v2/requirements/{id} 📋 Copied! ▼

Role: Guest and above.

Parameters

Name Description
id * Numeric ID of the requirement.
Type: integer (path)

Responses

Code Description
200

The requirement. generation.status is PENDING, RUNNING, DONE (the draft is in pendingSuggestion), EMPTY (no testable draft; see code and reason) or FAILED. feedbackStatus is READY when new feedback is available; testCaseId is set after the first approval.

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

/api/v2/requirements/{id} 📋 Copied! ▼

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

/api/v2/requirements/{id} 📋 Copied! ▼

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

/api/v2/requirements 📋 Copied! ▼

Role: Standard and above.

Responses

Code Description
200

Every requirement and its suggestions were deleted.

Draft a test case (suggest)

/api/v2/requirements/{id}/suggestions 📋 Copied! ▼

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 generation.status is DONE, EMPTY or FAILED.

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 code and the Retry-After header.

404

The requirement does not exist.

List suggestions

/api/v2/requirements/{id}/suggestions 📋 Copied! ▼

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. status is PENDING, APPROVED or DISCARDED; current marks the latest one; payload is the drafted test case.

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

/api/v2/requirements/{id}/suggestions/{suggestionId}/approve 📋 Copied! ▼

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). Location points at it.

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

/api/v2/requirements/{id}/suggestions/{suggestionId}/discard 📋 Copied! ▼

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 DISCARDED and kept for reference.

404

The requirement does not exist.

Delete a suggestion

/api/v2/requirements/{id}/suggestions/{suggestionId} 📋 Copied! ▼

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

/api/v2/requirements/{id}/suggestions 📋 Copied! ▼

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

/api/v2/requirements/{id}/feedback 📋 Copied! ▼

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. verdict is NO_DEFECT (passed), AUTHORING_DEFECT (the test is wrong; re-suggest), REAL_DEFECT (the test found a real problem) or INFRA_FAULT (a device or infrastructure glitch; re-run). Repeated identical results are counted in occurrenceCount.

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

/api/v2/requirements/{id}/done 📋 Copied! ▼

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

/api/v2/requirements/{id}/reopen 📋 Copied! ▼

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.