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

Get-NotionPage

SYNOPSIS

Retrieves properties of a Notion page using the Notion API.

SYNTAX

Get-NotionPage -PageId <String> [-maxDepth <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

EXAMPLE 1

$pageId = "d5f1d1a5-7b16-4c2a-a2a6-7d43574a1787"
Get-NotionPage -PageId $pageId

This example retrieves the page with the specified ID.

PARAMETERS

-maxDepth

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

-PageId

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

-ProgressAction

{{ 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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

notion_page

NOTES

  • 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.

RELATED LINKS

https://developers.notion.com/reference/retrieve-a-page-property-item

⚠️ **GitHub.com Fallback** ⚠️