notionapi-agent icon indicating copy to clipboard operation
notionapi-agent copied to clipboard

Add new API endpoints

Open dragonman225 opened this issue 5 years ago • 1 comments

It seems that Notion is using the new API endpoint /api/v3/syncRecordValues to get data instead of the old one /api/v3/getRecordValues.

The new API looks like below:

Request body

{
  recordVersionMap: {
    "<table_name>": {     // e.g. block
      "<id>": "<version>" // <version> = -1 means the latest
    }
  }
}

Response body

{
  recordMap: {
    "<table_name>": {
      "<id>": data
    }
  }
}

Does this change indicate that /api/v3/getRecordValues will be deprecated? We'll see.

dragonman225 avatar Jun 20 '20 13:06 dragonman225

A new and interesting one, /api/v3/getBacklinksForBlock.

Request body

{"blockId":"1c4d63a8-ffc7-47be-a565-8672797a595a"}

Response body

{
  backlinks: [],
  recordMap: {}
}
  • The recordMap is the familiar one like this.

dragonman225 avatar Sep 06 '20 16:09 dragonman225