Search-NotionDatabase
SYNOPSIS
Retrieves list of pages in specified database that is shared with the integration.
SYNTAX
Search-NotionDatabase [-Token] <String> [-DatabaseId] <String> [[-Filter] <PSObject>] [[-Sort] <Array>]
[[-PageSize] <String>] [[-StartCursor] <String>] [<CommonParameters>]
DESCRIPTION
The Search-NotionDatabase cmdlet retrieves a list of pages in the specified database then sorts and filters them based on your criteria.
EXAMPLES
Example 1
PS C:\> $SearchFilter = @{
"or" = @(
@{
"property" = "In stock"
"checkbox" = @{
"equals": true
}
},
@{
"property" = "Cost of next trip"
"number" = @{
"greater_than_or_equal_to": 2
}
}
)
}
PS C:\> $SearchSort = @(
@{
"property" = "Last ordered"
"direction" = "ascending"
}
)
PS C:\> Search-NotionDatabase -Token "yoursupersecrettokenvalue" -DatabaseId "9bd15f8d-8082-429b-82db-e6c4ea88413b" -Filter = $SearchFilter -Sort = $SearchSort
This command searches the specified database with the specified filter and sort.
PARAMETERS
-DatabaseId
Specifies a string containing the ID of the database you wish to retrieve pages from.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Filter
Specifies an object containing the filters you wish to use for the search.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PageSize
Specifies an string containing the page size you want returned from the API. The maximum page size allowed currently is 100.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Sort
Specifies an array containing the sorting you wish to use for the search.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-StartCursor
Specifies a string containing the start cursor of the next page you want to retrieve.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Token
Specifies a string containing the integration token value.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
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.