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

How to get all cases from section including cases from subsections using api?

I need to get all the “caseId” from the section of the test suite including its subsection testcases. I don’t want to get all the cases from suite. I want to get all the cases (including cases of subsection ) from the section, how can i do that?
I tried using

GET index.php?/api/v2/get_cases/:project_id \ &suite_id=:suite_id \ &section_id=:section_id

But it will only provide the cases of section but won’t show sub section cases. How can i get that?

You would need to get the sections id first using

GET index.php?/api/v2/get_sections/:project_id&suite_id=:suite_id

Check the value of “parent_id” from the response to get the correct parent-child sections.
Then you just need to loop for each section id to get the test cases.

1 Like

Thank you for that response Gavril