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

Connection to TestRail API with java bindings


#1

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]

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

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,
Killian


#2

Hi Killian,

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

/projects/overview/1

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:

http://docs.gurock.com/testrail-api2/reference-tests#get_tests

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!

Regards,
Marco


#3

Thanks Marco,

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

Thanks,
Killian


#4

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.

Regards,
Marco