Reposrting API call for child pages

What is the query(ies) to get the following data via reporting API?

Need to get unique pageviews for all the child pages. ( Ideally including parent, but could be done in another call.)

use either &flat=1 or &expanded=1

see: Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

@matt but how to get a list of all the child pages of “X”?

Solved it by querying first for parent with label=X and getting idSubtable=Y.
And then query for children with idSubtable=Y.