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

how get list of all sections (if I have more then 127 items)


Hello. I use api

for get list sections, but this script outputs 127 items and string "

more elements…
Question: how get list of all sections ?

require ‘testrail.php’;

$client = new TestRailAPIClient(‘’);
$case = $client->send_get(‘get_sections/11&suite_id=24’);


Hi Artem,

Do note that when using the get_sections API call. The “&suite_id=” is only required when you have more than one suite. The more commonly used single repository for all test cases, would not need this variable.

The output is simply an array that contains all section details.

I hope this helps and please let me know in case you have any further questions!


Can I get subsections i.e. not all subsections but only one next level of tree ?

I need get list subsections in root of suite.

I have more then one suite and I have neccessary to get list of sections in root of suite and list of sections which are children of specified section


The API currently will only return all sections. You would need to develop the script a bit more. The top level section contains “parent_id”:null while subsections will reference the ID number of the parent.

We don’t have any examples of this, but how to implement this knowledge would depend on if you are simply looking for all subsections or subsections belong to a specific parent.


I have many testcases and sections for structure them. Currently api outputs only first 127 sections.

This fact is a main limitation for execution this task.