Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Getting Exception While the simple Get Api Call


Hello Team,

I am trying the Test Rail Api to get the Use cases from My Java Program but i am getting the following exception.

Can you please check The Issues or anything i am missing here …

APIClient client = new APIClient(“”);
JSONObject c = (JSONObject) client.sendGet(“get_case/C1214299”);

Exception in thread “main” com.gurock.testrail.APIException: TestRail API returned HTTP 404(No additional error message received)
at com.gurock.testrail.APIClient.sendRequest(
at com.gurock.testrail.APIClient.sendGet(
at com.gurock.testrail.Program.main(


Hello Team,

I am able to resolve the Issue by Changing and Removing the testRail from the Url and Checking for the Authentication In the Request.

Now I am getting the Proper Response and One more thing I have to remove the C from the Starting of the Usecase ID.


Hi Pawan,

Thanks for your posting. Great to hear that you solved it already! Yes, addresses don’t need /testrail/ as part of the URL and all API methods also expect the numeric part of the IDs only (so get_case/17 instead of get_case/C17).



Thanks Gurock for the Reply,

I am new to Test Rail and trying to integrate Cases with our Automated Testcases.

I tried to look for examples on internet but couldn’t find any blog or good example of proper implementation. Can you please help me if you know any blogs or content which can help me.



Hi Pawan,

Sure, you can find a good overview posting on our blog here:

This demonstrates how other teams and users integrate their automated testing with TestRail and should be a good starting point.

I hope this helps!