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

API suggestion


#1

I like testrail API but these URL’s drive me nuts. It feels really redundant since I have to specify an HTTP method anyways.

/get_case/:case_id => GET
/update_case/:section_id => PUT
/add_case/:section_id => POST
/delete_case/:case_id => DELETE

Why not this:

/case/:case_id => GET
/case/:case_id => PUT
/case/:section_id => POST
/case/:case_id => DELETE

Again not a huge deal, just a pet peeve of mine.


#2

Hello Casey,

Thanks for your posting. There are a few reasons for this and the most important is that entities in TestRail can have more than just the standard four CRUD methods. E.g., with the test runs & plans, you have the additional ‘close’ method. It is also planned to look into adding additional methods, e.g. to copy test suites or rerun test runs/plans. Since there’s no straightforward and easy to use mapping between additional entity methods and the strict REST model, we decided to include the action in the API method for now.

Regards,
Tobias