In this tutorial guide, we will learn how to execute TestLink Rest API requests and some sample API endpoints. REST stands for Representational State Transfer. REST allows interaction with systems that are built on HTTP standard protocol. REST is an alternative to legacy systems that are built on SOAP(Simple Object Access Protocol).
- TestLink instance up and running
To execute TestLink Rest API calls, we need to have Testlink Web application up and running without any issues. Log in as the API user into the TestLink web application.
- Install Slim Framework on TestLink instance
CRUD stands for Create, Read, Update, and Delete. These are the major operations that API calls perform on the server-side resources.
The analogous REST verbs for these operations are as follows:
- Create -> POST method.
- Read -> GET method.
- Update -> PUT method.
- Delete -> DELETE method.
Manual API Test Tool
We use Postman for testing and executing the REST API calls. A quick overview and download steps can be found at:
There are multiple versions for the TestLink REST API endpoints, like.
We can specify the version in the REST endpoint URL.
Anatomy of API Request
Below is a TestLink REST API request executed to get the project’s information. Let’s understand the API request shown.
1- API endpoint. The server listens to the API request on this endpoint. Testlink might have many exposed endpoints each for a specific purpose.
2- HTTP method for the request. The shown call is a GET call.
3- Authorization – We need to specify the APIKEY
4- Request Headers for the API request.
5 – Response code – 200 OK means Success.
6 – Response Body received from the TestLink server.
Execute a Sample API call
Rest API allows us to interact with TestLink interaction in an automated fashion.
API opens doors to the integration with other components like Mantis BTS, Jira, etc.