Share this page

# Create a document report with descendants

The following flow demonstrates how to generate a document report with a rest API, including entity descendants.

In this topic:

## Overview

When working with entities, it is often important to view information about the descendants that were created under the entity.

For example, when looking at test runs under a given feature, we see test runs that were related directly to the feature (that ran tests directly related to that feature). You can also view test runs related to descendants of the feature entity, such as user stories.

You can show test runs for a feature along with the runs for its related user stories. In the above example, when you indicate to include descendants for the feature, it will also return the tests runs related to the user stories.

The REST API's include_all_descendants field corresponds to the Descendant inclusion option in Analysis and reporting. To include the descendants in your report, set the field to true: `"include_all_descendants": true`.

In the example below:

Feature A

> Test A

> run A

> Story B

> Test B

> run B

- If you do not include descendants, it only returns test run A.
- If you include descendants, it returns test runs A and B.

Note: Descendant inclusion is only relevant for hierarchical entities, such as work_item, test, requirement, and application module.

## Example - Hierarchical entity with a direct relation

The following example illustrates the generation of a document report in PDF format in which include_all_descendants was set to true. It returns all tests covering the descendants of the work_item entity.

    {
       "document_type":"PDF",
       "document_orientation":"PORTRAIT",
       "timezone":"UTC+03:00",
       "file_name":"Octane_Doc_Report.pdf",
       "report_entries":[
          {
             "entity_name":"work_item",
             "fields":[
    		"id", "name"
             ],
             "layout":"DETAILS",
             "report_entries":[
                {
                   "entity_name":"test",
                   "fields":[
                		"id", "name"
                    ],
                   "related_field_name":"test",
                   "include_all_descendants":true,
                   "layout":"DETAILS"
                }
             ]
          }
       ]
    }

## See also

- REST API calls
- Common flows and ER diagrams
- Analysis and reporting

https://admhelp.microfocus.com Software Delivery Management 8942
Tips to improve your search results... OpenText™ Software Delivery Management Help Center OpenText™ Software Delivery Management Help 26.3 All View Local Help Center View Online Help Center Version: