文档

查看我们的内容文档与文档接口说明

内容文档

查看我们的最新文档与资料

接口文档

文档接口由 portal 后端 /portal/docs 提供,字段与参数说明如下

GET/portal/docs

文档列表

由 portal 后端(gateway)提供;分页查询当前主体下的文档列表,需通过 ?org= 指定主体。

查询参数

参数类型必填默认说明
pageinteger否1页码,从 1 开始。
pageSize / page_sizeinteger否10每页条数,最大 50。
keywordstring否-按文档名称、描述或 slug 模糊搜索。
orgstring否-主体标识(如 day-x-time);不传时按访问域名识别。

响应示例

{
  "list": [
    {
      "id": "9d87bf03-1a47-4b88-b82b-8f21d8123d12",
      "slug": "about-us",
      "type_id": "196f23cc-86b6-4a30-ad8b-0d5b0b9862cc",
      "name": "关于我们",
      "description": "",
      "cover_image": "",
      "created_at": 1773230915,
      "updated_at": 1777508688
    }
  ],
  "total": 1
}

错误示例

{
  "error": "organization not found"
}
GET/portal/doc/:identifier

文档详情

由 portal 后端(gateway)提供;按 UUID 或 slug 获取文档详情,需通过 ?org= 指定主体。

路径参数

参数类型必填默认说明
identifierstring是-文档 id 或 slug。

查询参数

参数类型必填默认说明
orgstring否-主体标识(如 day-x-time);不传时按访问域名识别。

响应示例

{
      "id": "9d87bf03-1a47-4b88-b82b-8f21d8123d12",
  "slug": "about-us",
  "type_id": "196f23cc-86b6-4a30-ad8b-0d5b0b9862cc",
  "name": "关于我们",
  "description": "",
  "content": "<p><strong>测试11</strong></p>",
  "cover_image": "",
  "images": [],
  "files": [],
  "created_at": 1773230915,
  "updated_at": 1777508688,
      "app_code": "day-x-time",
      "org_code": "day-x-time"
}

错误示例

{
  "error": "doc not found"
}