Skip to main content

Quickstart for Testiny REST API

Learn how to get started with Testiny's REST API.

Getting started using curl

  1. Check if curl is installed on your machine by executing curl --version in the command line. If you see the version, it is installed. If not, you need to install curl. See the curl download page for more information.
  2. To authenticate, you need to specify an API key in your request. If don't have a Testiny API key yet, see our documentation on how to create an API key.

Treat the API key like a password and keep it safe.

  1. You can use the following curl command to get all projects in your Testiny account. You just have to replace <API_KEY_VALUE> with your API key.
curl -L -X GET '' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <API_KEY_VALUE>'
  1. As well as retrieving data, you can also add or update entities. Note that POST and PUT requests require a body. The body can be passed with --data-raw.

    The following example shows how to set the result of a test case in a test run. To achieve this, we want to update the testrun-testcase mapping and set the entities to testcase:testrun and define an update operation with op=update. The Testiny REST API offers the following operations for mappings: add, delete, update, add_or_update.

    In the body we define which test case in which test run we want to update. In this example, we update the test case with ID 1234 in test run with ID 3 and set the result_status to PASSED. Possible values for the result are "NOTRUN", "PASSED", "FAILED", "BLOCKED", "SKIPPED".

    For more information on this particular API call, see its description.

curl -L -X POST '' \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: <API_KEY_VALUE>' \
--data-raw '[{
"ids": { "testcase_id": 1234, "testrun_id": 3 },
"mapped": { "result_status": "PASSED" }