Databases-Endpoint Examples

Database(s)

{warning} Watch out:
This endpoint is no longer recommended by Notion and can be removed anytime.
Use ✨ Search instead.

# This endpoint is not recommended by Notion anymore but is working nevertheless. 
# Use the search endpoint instead.

# Returns all databases of the workspace that were explicitly granted access.
\Notion::databases()
        ->all()
        ->asCollection();

# Returns a single database
\Notion::databases()
        ->find($databaseId);