Description
Previously, when accessing the parent of a database or page, that parent was always either a page
, database
, or workspace
. This is un-faithful to the actual data model of Notion, where the parent may also be another block; for example, you can nest a page under a toggle block.
The parent field for page and database has been changed so that it is now always the direct parent of that page or database, and a new parent type has been added: block_id
.
Additionally, a parent
field has been added to the block object
. Together, these changes allow you to fully traverse Notion’s tree.
To emulate the previous behavior of retrieving the page, database, or space parent, you may traverse up the tree using the retrieve a block endpoint. If the parent ≠ one of those types, retrieve the parent block until it is.
Notion changelog: https://developers.notion.com/changelog/releasing-notion-version-2022-06-28