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

Connection to TestRail API with java bindings


Hi All,

I’m trying to connect to api with java bindings.
I’ve just changed the basic requirements required to connect and am getting the following in the logs:
[UriException] Invalid characters in URI: [/projects/overview/1/index_php?api/v2/get_tests/360]

File: /var/www/html/testrail/sys/core/uri.php
Line: 88
Status Code: 500

It also mentions URI and Host.

I’m feeling like i missed something but not sure what exactly.

If anyone could advise, that would be great.

Many thanks,


Hi Killian,

Thanks for your post! It looks as though you just included some extra details in the request URL:


This wouldn’t be required, and the request syntax should look like: index.php?/api/v2/get_tests/<run_id>

You can see an example of this on our website here:

If you’re still unsure, you can also provide the full API request that you made and we’re happy to help troubleshoot this. Hope this helps!



Thanks Marco,

I had few errors in this file which were corrected since.



Hi Killian,

Thanks for the update, and glad to hear you got it working now! Just let us know in case you run into anymore issues and we’re happy to help troubleshoot.