Restore NotionPage - fasteiner/Notion GitHub Wiki


Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page schema: 2.0.0 Type: Command

Restore-NotionPage

SYNOPSIS

Restores a Notion page by removing it from the trash or archive.

SYNTAX

Restore-NotionPage [-PageId] <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The `Restore-NotionPage` function restores a Notion page by setting the `in_trash` and `archived` properties to `$false`. This function uses the Notion API to perform the restore operation and returns the restored page object.

EXAMPLES

EXAMPLE 1

Restore-NotionPage -PageId "12345abcde"

Restores the Notion page with the ID `12345abcde` by removing it from the trash.

EXAMPLE 2

Restore-NotionPage -PageId "67890fghij" -WhatIf

Simulates the restore operation for the Notion page with the ID `67890fghij` without making any changes.

EXAMPLE 3

Restore-NotionPage -PageId "67890fghij" -Confirm:$false

Restores the Notion page with the ID `67890fghij` without prompting for confirmation.

PARAMETERS

-PageId

The unique identifier of the Notion page to be restored. This parameter is mandatory.

Type: String
Parameter Sets: (All)
Aliases: Id

Required: True
Position: 1
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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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]

Returns a notion_page object representing the restored Notion page.

NOTES

  • The function supports `ShouldProcess` for confirmation and safety.
  • Use this function cautiously, as it interacts with the Notion API to modify page properties.

RELATED LINKS

[https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page](https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page)

https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page

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