[英]Python, Notion.Get relational tables data
I try to get notion table data, but the relational table returns only the ID of the page, without the actual data.我尝试获取概念表数据,但关系表仅返回页面的 ID,没有实际数据。 How to get data using relation ID?如何使用关系ID获取数据?
databaseId ='my_database_id'
headers = {
"Authorization": "Bearer " + token,
"Content-Type": "application/json",
"Notion-Version": "2021-05-13"
}
def readDatabase(databaseId, headers):
readUrl = f"https://api.notion.com/v1/databases/{databaseId}/query"
res = requests.request("POST", readUrl, headers=headers)
data = res.json()
print(res.text)
The relation ID is a page ID.关系 ID 是页面 ID。 You can query the information using the GET /pages endpoint or the [GET /blocks endpoint][1]
您可以使用GET /pages 端点或[GET /blocks endpoint][1]
查询信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.