Invoke NotionApiCall - fasteiner/Notion GitHub Wiki
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: False
The 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: False
The 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: False
The 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: False
The 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: False
The 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: False
The URI to Notion.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The 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: 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.
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