KNotion Databases
Interface for managing Notion databases through the Notion API. This interface provides methods to create, retrieve, update, and query databases in your Notion workspace. Databases can be created as children of pages and can contain various property types and content.
Example usage:
// Retrieve a database
val database = client.databases.getDatabase("database-id")
// Query a database
val results = client.databases.queryDatabase(
id = "database-id",
query = DatabaseQuery().apply {
filter("Status", "equals", "Done")
}
)Functions
Creates a new database as a child of a page. The database must have at least one title property defined in the properties list.
Retrieves a database by its ID. This method fetches all database properties, schema, and metadata.
Lists all databases that have been shared with your integration. This method returns a paginated list of databases that your integration has access to.
Queries a database for pages that match specific criteria. This method allows you to filter, sort, and paginate through database contents.
Updates an existing database's properties. This method allows you to modify the database's title, icon, cover, and property schema.