How to read the list of pages with its names and ids in the home page (top level, workspace page) in Notion (using API or SDK)
I want to read all the pages in the home page ie top level workspace page in Notion using API or SDK Top level Page1 Page2 Page3 Parent of Page1, Page2 and Page3 is workspace. I dont have the block (page) id since it is the top level.
I tried using the following API: https://api.notion.com/v1/pages/ with body: { "parent": { "type": "workspace", "workspace": true }, "properties": { } }
It gave the following error:
{
"object": "error",
"status": 400,
"code": "validation_error",
"message": "body failed validation. Fix one:\nbody.parent.page_id should be defined, instead was undefined
.\nbody.parent.database_id should be defined, instead was undefined
.",
"developer_survey": "https://notionup.typeform.com/to/bllBsoI4?utm_source=postman"
}