Tesults API Results

If you are just getting started with Tesults and have not submitted test results data to Tesults yet and cannot see any results data in the results view, read the integration documentation instead. Once that has been completed, you can use the Tesults API to retrieve results data to make decisions within your continuous integration and deployment pipelines.


Fetch test results data.

Requesting test results data via the Tesults API is useful for analysis of results data outside of the Tesults interface in situations such as deciding whether to proceed with a deployment in a continuous deployment pipeline.

Results data is fetched for a specific target within a project. Utilize the Targets endpoint to fetch targets (also known as test jobs) and retrieve a target id. Then use the id for the target you are interested in to fetch results data.

A successful response contains a results object with an array of runs (test runs). Each run object contains a cases array (test cases) which you can loop through to check the name, suite, result and other properties of a test case. You may decide for example that if all the test cases are passing (result value is 'pass') that you go ahead with a deployment.


GET Method


The Authorization header is required for all requests to the Tesults API. See the authentication documentation for details.

Bearer <token>


Total: 3
targetThe target id for the target for which you want to retrieve test results data.
limit (optional)A number (minimum value 1) to limit the number of test runs returned. If no limit is supplied the default limit is 1, meaning that only the latest test run data is fetched. If you wanted to fetch the last two test runs you would set limit to 2.
cursor (optional)Pagination parameter. If a cursor is returned in the response data from a request that means more data is available. Add the value of the cursor returned in the response in the next request to retrieve the next set of data.


Successful response:

  "data": {
    "code": 200,
    "message": "Success",
    "results": {
      "runs": [
          "created_time": 1631398688540,
          "cases": [
              "name": "Sign in successfully",
              "desc": "Signs in to site",
              "suite": "Authentication",
              "result": "pass",
              "duration": 11122000,
              "num": 0,
              "hash": "7c95f9b7-51ad-53ca-8010-578d92c19fdd",
              "_CustomField": "Custom value",
              "params": {
                "terrain": "land",
                "climate": "warm",
                "temperature": "25C"
              "files": [
                "screenshot1.png", "test.log"
            {... more test cases}
    "cursor": <cursor>

Failure response:

  "error": {
    "code": 400,
    "message": "Missing parameter: target"

Successful responses return JSON containing a data property. Error responses return JSON containing an error property. Both data and error values contain a code and message property, specifying the http status code and a message containing additional context.

Successful responses also contain additional properties within data. The response includes results with runs (test runs) each with an array of cases (test cases). There is also a cursor for pagination to use if there is additional data (more test runs) that can be retrieved.