RE: APIs returning 400 Bad Request

Davide Pozzoli, modified 1 Month ago.

APIs returning 400 Bad Request

Youngling Posts: 3 Join Date: 12/23/22 Recent Posts
Hi,
I was trying to use one of the API listed in https://www.klaros-testmanagement.com/files/api-doc/resources/, in particular the GET /api/v1/resources/projects/id/{id}/testSuites

Using the browser plugin as advised in the documentation I keep getting the 400 bad Request error code.

What am I missing ?

Thanks in advance
Davide
thumbnail
Torsten Stolpmann, modified 1 Month ago.

RE: APIs returning 400 Bad Request

Jedi Council Member Posts: 736 Join Date: 2/12/09 Recent Posts
Hello Davide ,

did you provide a valid username and password in your basic authentication parameters (e.g. admin/admin)?

Please let me know if this resolves your problem.

​​​​​​​Regards,

Torsten
​​​​​​​
Davide Pozzoli, modified 1 Month ago.

RE: APIs returning 400 Bad Request

Youngling Posts: 3 Join Date: 12/23/22 Recent Posts
Hi Torsten,
In that case the error code becomes 404 Not Found. I don't have admin rights for the account that I'm using could it be a problem ?


Regards 

Davide
thumbnail
Torsten Stolpmann, modified 1 Month ago.

RE: APIs returning 400 Bad Request

Jedi Council Member Posts: 736 Join Date: 2/12/09 Recent Posts
Hello Davide,

there is another problem you are stumbeling about.

P00004 is a project name, not a project id. So for achieving what you are attempting, you must first get the project id for your project name, like this:



and then request the test suites like this:



Please let me know if this resolves your problem.

​​​​​​​Best regards,

​​​​​​​Torsten
​​​​​​​
Davide Pozzoli, modified 1 Month ago.

RE: APIs returning 400 Bad Request

Youngling Posts: 3 Join Date: 12/23/22 Recent Posts
Thank you Torsten for the quick response, that indeed solved my problem.

Can I ask whether there is an API for deleting content from Klaros (like Test Suite or Test Case) ? 

I looked throught the documentation and i wasn't able to find any reference

Regards,

Davide 
thumbnail
Torsten Stolpmann, modified 1 Month ago.

RE: APIs returning 400 Bad Request

Jedi Council Member Posts: 736 Join Date: 2/12/09 Recent Posts
The resource API is read-only at the moment. We do plan to extend it in the course of next year.

Regards,

Torsten