获取页面内容

Changed on

通过路径检索特定文档页面的完整文本内容。在搜索之后使用此接口来获取匹配页面的完整内容。

使用 assistant API 密钥进行身份验证。页面内容请求不消耗额度。

post/v1/page/{domain}

Request

  • Base URL
    https://api.mintlify.com/discovery
  • Auth
    HTTP bearer

Path parameters

domainstring required

来自你的 domain.mintlify.site URL 的域名标识符。可以在你的控制台 URL 末尾找到。例如,dashboard.mintlify.com/organization/domain 的域名标识符为 domain。

Request body

pathstring required

要检索内容的页面路径或 slug。对应于 Search documentation 端点返回的 path 字段。

groupsstring[]

你为其读取内容的用户所属的可选分组。如果省略 groups,你只能读取公开页面及其公开部分。在所有页面都需要身份验证的部署上,省略 groups 等同于传入空数组。空数组表示一个没有分组的已登录用户:你还可以读取对所有已登录用户开放的页面。传入分组时,你还可以读取仅限其中至少一个分组访问的页面。用户无法查看的 <Visibility> 部分会从页面中移除。Mintlify 不会验证分组成员身份,因此你的后端必须为每个用户选择分组。在包含公开页面的受密码保护部署上,传入空数组即可读取未标记为公开的页面。

Response

页面内容检索成功

pathstring

所请求的页面路径。

contentstring

页面的完整文本内容。

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    2 more changes in this revision