Api request to retrieve folders + hierarchy + test cases lists

Monday, July 15, 2024
Avatar

Hi inflectra,

 

I would like to know if an API request exist to retrieve (get) the content off all test case folders of a project with also the folders and subfolders + hierarchy. More precisely i want to retrieve not only the test cases folders (as possible with projects/{project_id}/test-folders) and not only the list of test cases (as possible with projects/{project_id}/test-cases?starting_row={starting_row}&number_of_rows={number_of_rows}&sort_field={sort_field}&sort_direction={sort_direction}&release_id={release_id})

but i want to retrieve from a project the folders (level 0 just at the root) + it's test cases lists + it's subfolders level 1 + the test case lists level1 + it's subfolders level2 + it's test cases list level 2 + it's subfolders level3, etc.)

It would be nice to have like a request api that scan and retrieve all the content of all folders of the project to get at the end the hierarchy folders and the tests cases lists with their position in the hierarchy.

 

Hope it's clear and you will be able to answer to me.

 

Thanks.

Carine

1 Replies
Tuesday, July 16, 2024
Avatar
re: doucoure Monday, July 15, 2024

Hi Carine,

In general, the current (v7.0 at time of writing) APIs support:

  • Retrieving a folder based on its parent (or the root folders)
  • Retrieving a test cases based on its folder (or root test cases)

That was done mainly for performance reasons, so you would need to make as series of recursive calls to get all the data.

However, there is an older v4.0 API that works closer to the way you want:

GET: projects/{project_id}/test-cases/search?starting_row={starting_row}&number_of_rows={number_of_rows}

Regards

David

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Monday, July 15, 2024
  • Last Reply: Tuesday, July 16, 2024
  • Replies: 1
  • Views: 375