Stop Test Result
This endpoint creates stop requests for one or more test results.
For each given test result ID, the service checks whether the result is active. Active test results are marked as TERMINATING and a stop request is published.
Active statuses are WAITING, PROCESSING, and RUNNING.
If a test result is not active, already marked for stop, not found, or not accessible within the current company scope, it is skipped and the endpoint still returns a successful empty response.
Endpoint Information
- URL: {gateway-url}/stop-requests/result
- Method: POST
- Authentication: Required (Bearer Token)
Request Headers
Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token used for authentication. Example: Bearer <your_access_token> |
Content-Type | Yes | Must be application/json. |
X-Company-Id | Yes | The company ID used by the gateway to authorize and route the request. |
Request Body
{
"results": [614, 615, 312]
}Request Body Parameters
Field | Type | Required | Description |
|---|---|---|---|
results | Array | Yes | A non-empty list of test result IDs. |
results[] | Long | Yes | Each item in the list must be a non-null test result ID. |
Response
This response indicates that the stop request operation was completed successfully. No additional data is returned.
{}Response Notes
- Only active test results are processed.
- Active statuses are WAITING, PROCESSING, and RUNNING.
- Test results in other statuses are skipped.
- Test results that are already stop-requested are skipped.
- Non-existing result IDs are skipped and do not cause a 404 response.
- Result IDs outside the current company scope are skipped.
- For all-in-one test executions, related results in the same execution may also be marked as TERMINATING.
Error Response Format
{
"instance": "/stop-requests/result",
"status": 400,
"title": "Bad Request",
"type": "https://errors.testinium.com/validation",
"timestamp": "2026-08-18T12:08:41.165927056Z",
"errorType": "VALIDATION",
"errors": [
{
"code": 20005,
"message": "must not be empty",
"field": "results"
}
]
}HTTP Error Codes
HTTP Code | Error Message | Description |
|---|---|---|
400 | Bad Request | The request body is invalid, malformed, or missing required fields. |
401 | Unauthorized | Authentication is missing or invalid. Check the Bearer token. |
403 | Forbidden | The authenticated user does not have permission for this operation or company. |
405 | Method Not Allowed | The endpoint was called with an unsupported HTTP method. |
500 | Internal Server Error | An unexpected error occurred on the server side. |
503 | Service Unavailable | The routed service is unavailable or cannot be reached through the gateway. |
Application Error Codes
Code | HTTP Status | Source | Description |
|---|---|---|---|
10001 | 401 | Gateway | Authentication is required. |
10002 | 401 | Gateway | Token is invalid or cannot be verified. |
10003 | 403 | Gateway | Authorization failed for the requested resource. |
10004 | 400 | Gateway | A required header, such as X-Company-Id, is missing or invalid. |
10008 | 503 | Gateway | Routed service is unavailable. |
20005 | 400 | Common Validation | Request body validation failed. For example, results is empty or contains null. |
20009 | 405 | Common Validation | HTTP method is not supported. |
Example Request
curl --location '{gateway-url}/stop-requests/result' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--header 'X-Company-Id: <company_id>' \
--data '{
"results": [32963]
}'