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?
CodePudding user response:
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'
}
}