Site icon TestingDocs.com

How to execute Rest API call using Postman

Overview

In this tutorial, we will go through the steps involved to execute the REST API call using the Postman API tool. Sample API call that we execute is :

GET   http://<testlink_home>/lib/api/rest/v2/testprojects

This call returns the projects created in the TestLink Web application.

New to TestLink Rest API, please refer to the API guide:

https://www.testingdocs.com/testlink-rest-api-guide/

Postman Tool

https://www.testingdocs.com/postman-api-tool/

Chrome browser app

https://www.testingdocs.com/download-install-postman-chrome-app/

Steps to Execute

Launch the Postman API tool.

Add the Rest API endpoint using the box URL in the Postman tool.

 

 

Choose the method: GET to execute the get method. Get requests do not need a request body.

In the Authorization, tab choose the Key as APIKEY and

enter the value in the Value text box as shown in the picture.

 

 

Click on the Send button to execute the API call.

Successful API call response status code should be 200 OK/ 201 created etc.

 

 

 

API call Response:

{
"status": "ok",
"message": "ok",
"item": [
{
"id": "1",
"notes": "<p>www.TestingDocs.com</p>",
"color": "",
"active": "1",
"option_reqs": "0",
"option_priority": "0",
"option_automation": "0",
"options": "O:8:\"stdClass\":4:{s:19:\"requirementsEnabled\";i:1;s:19:
\"testPriorityEnabled\";
i:1;s:17:\"automationEnabled\";i:1;s:16:\"inventoryEnabled\";i:0;}",
"prefix": "TDocs",
"tc_counter": "0",
"is_public": "1",
"issue_tracker_enabled": "0",
"code_tracker_enabled": "0",
"reqmgr_integration_enabled": "0",
"api_key": "7eb55806c7f7e8ccc83ce4b5b807c9866e5baba05430306f2525296d55db752b",
"name": "TestingDocsProject",
"effective_role": "8",
"itname": null,
"ittype": null,
"rmsname": null,
"rmstype": null,
"opt": {
"requirementsEnabled": 1,
"testPriorityEnabled": 1,
"automationEnabled": 1,
"inventoryEnabled": 0
}
}
]
}

Verification

Log on to the TestLink Web application.

Check the test projects in the UI.

Test projects in the TestLink Web application.

 

 

Sample Rest API Defect

https://www.testingdocs.com/sample-defect-report-rest-api-testing/

Rest API Automation Tool

https://www.testingdocs.com/rest-api-automation-with-karate-automation-tool/

Exit mobile version