Get NotionPage - fasteiner/Notion GitHub Wiki
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/retrieve-a-page-property-item schema: 2.0.0 Type: Command
Retrieves properties of a Notion page using the Notion API.
Get-NotionPage -PageId <String> [-maxDepth <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
The `Get-NotionPage` function retrieves a specified Notion page by making a GET request to the Notion API's `/v1/pages/{page_id}` endpoint, utilizing the `Invoke-NotionApiCall` function.
$pageId = "d5f1d1a5-7b16-4c2a-a2a6-7d43574a1787"
Get-NotionPage -PageId $pageId
This example retrieves the page with the specified ID.
The maximum depth of subblocks objects. The default is 5.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False
The unique identifier of the Notion page. This is a required parameter.
Type: String
Parameter Sets: (All)
Aliases: Id
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
-
Ensure that the Notion API integration has access to the page.
-
The API token and version are handled within the `Invoke-NotionApiCall` function.
-
If you need the page content use [Get-NotionPageChildren](./Get-NotionPageChildren.ps1) to get the children of the page.
https://developers.notion.com/reference/retrieve-a-page-property-item