日时迹

文档

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

内容文档

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

接口文档

文档接口由本站 /api/docs 提供,字段与参数说明如下

GET/api/docs

文档列表

分页查询当前主体下的文档列表;未识别到主体上下文(域名、x-org-sign 头或 ?org= 参数)时返回全部文档。

查询参数

参数类型必填默认说明
pageinteger1页码,从 1 开始。
pageSize / page_sizeinteger10每页条数,最大 50。
keywordstring-按文档名称、描述或 slug 模糊搜索。
orgstring-主体标识(如 dayxtime),也可通过域名或 x-org-sign 头指定。

响应示例

{
  "list": [
    {
      "id": 1,
      "slug": "about-us",
      "type_uuid": "196f23cc-86b6-4a30-ad8b-0d5b0b9862cc",
      "name": "关于我们",
      "description": "",
      "cover_image": "",
      "created_at": 1773230915,
      "updated_at": 1777508688
    }
  ],
  "total": 1
}

错误示例

{
  "error": "invalid request"
}
GET/api/docs/:identifier

文档详情

按数字 id 或 slug 获取文档详情;identifier 为纯数字时按 id 查询,否则按 slug 查询。

路径参数

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

响应示例

{
  "id": 1,
  "slug": "about-us",
  "type_uuid": "196f23cc-86b6-4a30-ad8b-0d5b0b9862cc",
  "name": "关于我们",
  "description": "",
  "content": "<p><strong>测试11</strong></p>",
  "cover_image": "",
  "images": [],
  "files": [],
  "created_at": 1773230915,
  "updated_at": 1777508688,
  "project_id": 1,
  "organization_id": 5
}

错误示例

{
  "error": "doc not found"
}