Developer API
V2

获取页面属性

按属性 ID 单独读取页面属性值,适合处理大字段或分页属性。

GET /v2/pages/:page_id/properties/:property_id

获取页面属性

适用场景

当某个页面属性很大、需要分页读取,或者你只想单独读取某一个属性值时,使用这个接口最合适。

接口信息

项目内容
方法GET
路径/v2/pages/:page_id/properties/:property_id
请求体
返回property_itemlist
Scopepages.read

权限要求

需要 pages.read

请求参数

参数类型必填说明
page_idstring页面 ID。
property_idstring属性 ID,不是属性名。
start_cursorstring分页游标。
page_sizenumber默认 25

响应结果

分页属性会返回 list

{
  "object": "list",
  "type": "property_item",
  "property_item": {
    "object": "property_item",
    "id": "title",
    "type": "title"
  },
  "results": [
    {
      "type": "text",
      "text": {
        "content": "季度规划",
        "link": null
      },
      "plain_text": "季度规划",
      "href": null
    }
  ],
  "next_cursor": null,
  "has_more": false
}

单值属性会直接返回 property_item

{
  "object": "property_item",
  "id": "16161616-1616-4616-8616-161616161616",
  "type": "select",
  "select": {
    "id": "18181818-1818-4818-8818-181818181818",
    "name": "Doing",
    "color": "yellow"
  }
}

行为说明

  • property_id 必须传属性 ID,不要传显示名。
  • 默认分页规则来自统一分页逻辑,但这个接口把默认值调整为 25
  • titlerich_textrelationpeople 这类内容会以分页形式返回。
  • 其他单值属性通常直接返回 property_item

错误提示

  • 400 validation_error:参数不正确。
  • 401 unauthorized:token 无效或已过期。
  • 403 forbidden:缺少 pages.read 或无权访问页面。
  • 404 not_found:页面或属性不存在。

相关文档

前置阅读

下一步

相关参考