Get Command Results By TestResultId
This endpoint retrieves paginated command results for a specific test result.
Each command result includes the executed command, request parameters, execution result, status, runtime, execution order, and screenshot URL when available.
The results can be sorted by command execution order and filtered to return only commands that contain screenshots.
Endpoint Information
Method: GET
URL:
Authentication: A Bearer token is required.
Replace <custom-env-url> with your environment’s base URL, {testResultId} with the test result ID, and <your_access_token> with your access token.
Path Variables
Parameter | Type | Required | Description |
|---|---|---|---|
testResultId | Long | Yes | The unique identifier of the test result whose command results will be retrieved. |
Query Parameters
Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | Integer | No | 0 | Zero-based page index. The first page is 0. |
size | Integer | No | 10 | Maximum number of command results returned per page. |
isDesc | Boolean | No | false | Determines the sorting direction based on command execution order. When true, the latest command is returned first. |
hasScreenshot | Boolean | No | false | When true, only command results that have a screenshot are returned. |
Filtering and sorting are applied before pagination.
Response Body
Upon a successful request, the API returns a paginated collection of command results associated with the requested test result.
The following example shows two command results with page=0, size=10, isDesc=false, and hasScreenshot=false:
Command Result Fields
Field | Type | Description |
|---|---|---|
id | Long | The unique identifier of the command result. |
command_name | String | The name or WebDriver endpoint of the executed command. |
command_type | String | The HTTP method used to execute the command, such as GET, POST, or DELETE. |
parameters | String | JSON-formatted string containing the parameters supplied to the command. |
result | String | JSON-formatted string or plain-text result returned by the command. It may be an empty string when the command does not return a value. |
status | String | The execution status of the command, such as SUCCESS or FAILURE. |
runtime | Long | Command execution duration in milliseconds. |
order | Long | The execution order of the command within the test result. This field is used for sorting. |
screenshot_url | String or null | URL of the screenshot captured for the command. Returns null when no screenshot exists. |
JSON-Formatted String Fields
The parameters and result fields are returned as strings, even when their contents represent JSON objects.
For example, the following parameters value:
represents:
Clients that need to access individual values must parse the string as JSON. Only parse result as JSON when it contains valid JSON; it may also contain plain text or an empty string.
Pagination Fields
Field | Type | Description |
|---|---|---|
content | Array | Command results returned for the current page. |
page | Integer | Current zero-based page index. |
size | Integer | Maximum number of command results requested per page. |
total_elements | Long | Total number of command results after filtering is applied. |
total_pages | Integer | Total number of pages available for the selected page size. |
Get Command Results with Screenshots
Set hasScreenshot=true to exclude command results that do not contain a screenshot:
When hasScreenshot is omitted or set to false, records without screenshots may also be returned. For those records, screenshot_url is null.
Get the Latest Command Result with a Screenshot
Use the following parameters to retrieve the latest command result that contains a screenshot:
Parameter | Value |
|---|---|
page | 0 |
size | 1 |
isDesc | true |
hasScreenshot | true |
Command results without screenshots are filtered out first. The remaining records are sorted by order in descending order. Because size is 1, only the latest command result containing a screenshot is returned, if one exists.
Error Codes
HTTP Code | Error Message | Description |
|---|---|---|
400 | Bad Request | One or more request parameters are invalid. |
401 | Unauthorized | The access token is missing, invalid, or expired. |
403 | Forbidden | The authenticated user is not authorized to access the specified test result. |
404 | Test Result Not Found | The specified test result was not found. |
500 | Internal Server Error | An unexpected error occurred on the server side. |
Example Request
Retrieve the first page of command results, including results with and without screenshots: