I tried fetching a test case detail using JAVA API, but couldn’t fetch it. Initially it asked me to add the required certificates. I added that. After that it started giving 401 error. I even tried curl command as described in this link - http://docs.gurock.com/testrail-api2/accessing. I added “-k” to the curl command and ran it and the result was same. The error that i received is present below:
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.
The curl command:-
curl -k -H “Content-Type: application/json” -u “username:passsword” “https:///testrail/index.php?/api/v2/get_case/1”
Please let me know where I’m going wrong.