TestRail API is disabled for your installation (error)
Problem:
I tried calling the TestRail API to retrieve a case through the REST API. This is my curl
command used:
C:\Users\ahmed> curl -H "Content-Type: application/json" -u "ahmed@revelationtech.com:16JQ1MTMMsEQl4wIeCp" "https://ahmedttt.testrail.io/index.php?/api/v2/get_case/1"
The error received in the JSON response was:
{"error":"The API is disabled for your installation. It can be enabled in the administration area in TestRail under Administration > Site Settings > API."}
Solution:
- On the TestRail console, click on Administration.
- Click on Site Settings.
- Click on API.
- Check "Enable API" and click on Save settings.