query Database
abstract suspend fun queryDatabase(id: UuidString, query: DatabaseQuery? = null, sort: PropertySort? = null, pagination: Pagination = Pagination()): ResultPage<Page>
Queries a database for pages that match specific criteria. This method allows you to filter, sort, and paginate through database contents.
Return
A ResultPage containing a list of Page objects and pagination information
Parameters
id
The unique identifier of the database to query
query
Optional query parameters to filter the results
sort
Optional sorting parameters to order the results
pagination
Optional pagination parameters to control the number of results
See also
Throws
Notion Api Exception
if the database doesn't exist or the API request fails