0

I am looking for a way to get the list of folders under a test lab and display it in some UI. Is there a way to get the list using REST API? I tried /test-set-folders but I didn't see the folders that I am expecting.

arn-arn
  • 1,328
  • 1
  • 21
  • 31

1 Answers1

2

There are two types of folder hierarchy test lab and test plan. Both are different entity types. In side the test lab, you can have following kind of hierarchy

Folder1

   Folder2

       Test-set1 <-- this is test set (not a folder)

http://..../test-set-folders whill give you the list of folders, not the test-sets. This is paginated result. So if you have more than specified limit then it will display the first 100 or whatever is the limit. To get the next set of folders, you need to fetch the next page.

http://..../test-set-folders?page-size=100&start-index=101

Using above query it will bring next set of folders and you can further iterate till last page by changing start-index (increment by page-size)

Hope this will help.

Gaurav
  • 811
  • 9
  • 21
  • thanks Gaurav. Yes, the test-set-folders are showing the list of folders. Is there a way to show the children/sub-folders? – arn-arn Jan 26 '18 at 16:35
  • 1
    It will list all the folders including parent and childs. You need to prepare hierarchy based on the data. Each folder will have parent-id out of which you can make hierarchy – Gaurav Feb 23 '18 at 08:44