-
Notifications
You must be signed in to change notification settings - Fork 1
Invoke NotionApiCall
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://www.notion.com/developers/api-reference Notion API Reference schema: 2.0.0 Type: Command
Invokes an API call to Notion.
Invoke-NotionApiCall [[-uri] <String>] [-APIKey <SecureString>] [-APIVersion <String>] [-method <Object>]
[-body <Object>] [-fileName <Object>] [-pageSize <Int32>] [-first <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
This function is used to make API calls to Notion. It supports various HTTP methods such as GET, POST, PUT, DELETE, and PATCH. It also allows you to specify the API key, API version, and other parameters required for the API call.
Invoke-NotionApiCall -uri "https://api.notion.com/v1/databases" -APIKey "YOUR_API_KEY" -APIVersion "2021-05-13" -method "GET" -pageSize 50
This example invokes a GET API call to the Notion API to retrieve a list of databases. It specifies the API key, API version, and page size of 50.
The API key to authenticate the API call. (Optional)
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe version of the Notion API. (Optional)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $global:NotionAPIVersion
Accept pipeline input: False
Accept wildcard characters: FalseThe body of the API request. (Optional)
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the log file to write the API call details. (Optional)
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe HTTP method to use for the API call. Valid values are "GET", "POST", "PUT", "DELETE", and "PATCH".
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: GET
Accept pipeline input: False
Accept wildcard characters: FalseThe number of items from the full list desired in the response. Maximum: 100. (Default: 100)
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
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: FalseThe URI to Notion.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe number of items returned from the first page in the response. Maximum: 100.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function requires the "Invoke-RestMethod" cmdlet to be available.
[https://www.notion.com/developers/api-reference Notion API Reference](https://www.notion.com/developers/api-reference Notion API Reference)
https://www.notion.com/developers/api-reference Notion API Reference
Home
Module-FAQ
SetupOfIntegration
Commands
- Connect-Notion
- ConvertTo-NotionObject
- Disconnect-Notion
- Invoke-NotionApiCall
- Block
- Add-NotionBlockToPage
- Get-NotionBlock
- Get-NotionBlockChildren
- New-NotionBlock
- Remove-NotionBlock
- Update-NotionBlock
- _RichText
- Bookmark
- Breadcrumb
- BulletedListItem
- Callout
- ChildDatabase
- Code
- Column
- ColumnList
- Divider
- Embed
- Equation
- File
- Heading
- Image
- LinkPreview
- NumberedListItem
- Paragraph
- Quote
- Synced
- Table
- TableOfContents
- TableRow
- ToDo
- Toggle
- Video
- Database
- Emoji
- File
- Page
- Parent
- User
Classes
- Block
- Comment
- Database
- Database
- DatabaseProperties
- Emoji
- File
- General
- Page
- page
- page_reference
- PageProperties
- Parent
- Unfurl attribute
- User
Enums
- notion_color
- icontype
- Block
- blocktype
- RichText
- rich_text_type
- rich_text_mention_type
- Type
- MentionType
- DatabaseProperties
- File
- PageProperties
- Parent
- Properties
- User