读取文档
GET
/meta/v1/docs/{path}● 支持请求参数
pathstring必填path: Slash-separated documentation path from docs.search; optionally append #heading-id to select a section.
langstring可选query: Documentation language: zh for Chinese (default), en for English.
返回
200
错误按 problem+json 格式返回,参见 错误码
请求示例
curl
curl "https://api.deepraxis.com/meta/v1/docs/developers/automation/guides/write-workflow?lang=zh"Python
import requests
opts = dict(
base_url="https://api.deepraxis.com/meta",
)
resp = requests.get(
f"{opts['base_url']}/v1/docs/developers/automation/guides/write-workflow",
params={"lang": "zh"},
)
print(resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/meta",
};
const resp = await fetch(`${opts.baseURL}/v1/docs/developers/automation/guides/write-workflow?lang=zh`);
console.log(await resp.json());响应示例 200
{
"path": "developers/automation/guides/write-workflow",
"title": "编写工作流",
"url": "https://docs.deepraxis.com/developers/automation/guides/write-workflow",
"markdown": "# 编写工作流 (/developers/automation/guides/write-workflow)\n\n\n\n工作流是 YAML 写成的步骤列表,运行时保存检查点,可以等待、重试和并发。本页从最小骨架写到发布和运行。\n\n示例调用一个自建动作 `docs-samples/add-one`(输入 `{n}`,返回 `{answer}`)。命令沿用[快速开始](/developers/automation/quickstart#environment)的 `PRAXIS_API_URL` 与 `PRAXIS_API_KEY`;先创建这个动作(名字已被占用时返回 `NAME_TAKEN`,直接使用已有的即可):\n\n```bash\ncurl --fail-with-body -sS \"$PRAXIS_API_URL/automation/v1/actions\" \\\n -H \"Authorization: Bearer $PRAXIS_API_KEY\" -H 'Content-Type: application/json' \\\n --data '{\"namespace\":\"docs-samples\",\"name\":\"add-one\",\n \"input_schema\":{\"type\":\"object\",\"properties\":{\"n\":{\"type\":\"nu…(采样时截断:原文共 12625 字符,此处保留前 600)"
}响应
HTTP 200
Documentation page as Markdown, never the HTML website.
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| path | string | Documentation path, including the requested section anchor when present. |
| title | string | Human-readable title of the documentation page. |
| url | string | Canonical documentation URL for reading the page in a browser. |
| markdown | string | Compiled page Markdown, or only the requested heading section and its subsections. |