getAllBlockListRecursively

abstract suspend fun getAllBlockListRecursively(parentId: UuidString): List<Block>

Retrieves all blocks within a parent object, including all nested children blocks recursively. This method will fetch the complete block tree structure.

Caution: This method makes multiple API calls to fetch all nested blocks, which can be slow for pages with many blocks. Use with care for large pages.

Return

A flat list of all Block objects, including nested children

Parameters

parentId

The unique identifier of the parent page or block

Throws

NotionApiException

if the parent object doesn't exist or the API request fails