user16578778
user16578778

Reputation:

List all databases accessed by integration on the Notion

Is there a more efficient way to get the list of all databases in notion? I have tried using the https://api.notion.com/v1/databases endpoint but it's deprecated now. Another option is the /search endpoint but it is returning all the records within the database as well.

Can someone provide a better way to list all databases which are accessed by an integration?

Upvotes: 7

Views: 3364

Answers (1)

Jonas Scholz
Jonas Scholz

Reputation: 545

you need to filter for databases in the /search endpoint to only get databases back. In Python your payload would look like this:

payload = {
    'filter': {
        'value': 'database',
        'property': 'object'
    }
}

Upvotes: 6

Related Questions