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

How to get only active test run Ids with old api?


I have been looking for ways to get only active test run ids and cannot find it. I have used get_runs in minapi but it gives me all the test runs. I did try to parse that json and see if it has any active flag in it but no. There is field called “is_completed” in there but it is not same as is active.
Can someone give me name of api that only gives me active test run ids when project id is given?
(PS: I have to use the old version 1 api.)
Thanks again.



Thanks for your posting. A test run is considered active if the is_completed is 0/false. So, you can simply filter on the is_completed field in the JSON response.

That said, we really recommend looking into migrating to the new v2 API if at all possible. Besides being easier to use and much more powerful, the next version of TestRail (4.0) will also add support for API filters which let you filter responses directly on the API level (for example, ?is_completed=0 would return only active test runs).