Files
ittoview/docs/知识库API接口说明.md
2026-05-09 16:52:07 +01:00

424 lines
8.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 知识库 API 接口说明
面向知识库调用不面向前端展示。只保留知识库回答问题需要的数据ID、名称、归属关系、主要作用、ITTO、裁剪因素、绩效域详情、实体反查。
## 1. 通用约定
- 请求方式:`GET`
- 响应格式:`JSON`
- 静态文件路径统一放在 `/api`
- 不提供颜色、页面样式、搜索、五问一法
## 2. 接口列表
| 用途 | 路径 |
|---|---|
| 过程组列表 | `/api/process-groups.json` |
| 知识领域列表 | `/api/knowledge-areas.json` |
| 某知识领域裁剪因素 | `/api/knowledge-areas/{id}/tailoring-factors.json` |
| 某知识领域下的过程 | `/api/knowledge-areas/{id}/processes.json` |
| 某过程组下的过程 | `/api/process-groups/{id}/processes.json` |
| 49 个过程 | `/api/processes.json` |
| 单过程基础信息 | `/api/processes/{id}.json` |
| 单过程 ITTO | `/api/processes/{id}/itto.json` |
| 八大绩效域 | `/api/performance-domains.json` |
| 单绩效域详情 | `/api/performance-domains/{id}.json` |
| 工件反查使用情况 | `/api/artifacts/{id}/usage.json` |
| 工具反查使用情况 | `/api/tools/{id}/usage.json` |
## 3. 接口说明
### 3.1 过程组列表
`GET /api/process-groups.json`
```json
[
{ "id": "PG01", "name": "启动过程组" },
{ "id": "PG02", "name": "规划过程组" }
]
```
字段:
| 字段 | 含义 |
|---|---|
| `id` | 过程组 ID |
| `name` | 过程组名称 |
---
### 3.2 知识领域列表
`GET /api/knowledge-areas.json`
```json
[
{
"id": "KA01",
"name": "项目整合管理",
"tailoringFactors": [
{
"title": "项目生命周期",
"description": "本项目合适的项目生命周期?项目生命周期应包括哪些阶段?"
}
]
}
]
```
字段:
| 字段 | 含义 |
|---|---|
| `id` | 知识领域 ID |
| `name` | 知识领域名称 |
| `tailoringFactors` | 裁剪因素数组 |
| `title` | 裁剪因素标题 |
| `description` | 裁剪因素说明 |
---
### 3.3 某知识领域裁剪因素
`GET /api/knowledge-areas/{id}/tailoring-factors.json`
示例:
`GET /api/knowledge-areas/KA01/tailoring-factors.json`
```json
[
{
"title": "项目生命周期",
"description": "本项目合适的项目生命周期?项目生命周期应包括哪些阶段?"
}
]
```
---
### 3.4 某知识领域下的过程
`GET /api/knowledge-areas/{id}/processes.json`
示例:
`GET /api/knowledge-areas/KA01/processes.json`
```json
[
{
"id": "P1.1",
"name": "制定项目章程",
"processGroupId": "PG01",
"processGroupName": "启动过程组",
"purpose": "项目章程是正式批准项目并授权项目经理使用组织资源的文件。"
}
]
```
字段:
| 字段 | 含义 |
|---|---|
| `id` | 过程 ID |
| `name` | 过程名称 |
| `processGroupId` | 所属过程组 ID |
| `processGroupName` | 所属过程组名称 |
| `purpose` | 主要作用 |
---
### 3.5 某过程组下的过程
`GET /api/process-groups/{id}/processes.json`
示例:
`GET /api/process-groups/PG02/processes.json`
```json
[
{
"id": "P1.2",
"name": "制订项目管理计划",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"purpose": "生成一份综合文件,用于确定所有项目工作的基础及其执行方式。"
}
]
```
字段:
| 字段 | 含义 |
|---|---|
| `id` | 过程 ID |
| `name` | 过程名称 |
| `knowledgeAreaId` | 所属知识领域 ID |
| `knowledgeAreaName` | 所属知识领域名称 |
| `purpose` | 主要作用 |
---
### 3.6 49 个过程
`GET /api/processes.json`
```json
[
{
"id": "P1.1",
"name": "制定项目章程",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"processGroupId": "PG01",
"processGroupName": "启动过程组",
"purpose": "项目章程是正式批准项目并授权项目经理使用组织资源的文件。"
}
]
```
---
### 3.7 单过程基础信息
`GET /api/processes/{id}.json`
示例:
`GET /api/processes/P1.1.json`
```json
{
"id": "P1.1",
"name": "制定项目章程",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"processGroupId": "PG01",
"processGroupName": "启动过程组",
"purpose": "项目章程是正式批准项目并授权项目经理使用组织资源的文件。"
}
```
---
### 3.8 单过程 ITTO
`GET /api/processes/{id}/itto.json`
示例:
`GET /api/processes/P1.1/itto.json`
```json
{
"id": "P1.1",
"name": "制定项目章程",
"inputs": [
{
"id": "A002",
"name": "立项管理文件",
"details": []
}
],
"tools": [
{
"id": "TT002",
"name": "数据收集",
"details": [
{ "label": "头脑风暴" },
{ "label": "焦点小组" },
{ "label": "访谈" }
]
}
],
"outputs": [
{
"id": "A001",
"name": "项目章程",
"details": []
}
]
}
```
字段:
| 字段 | 含义 |
|---|---|
| `inputs` | 输入数组 |
| `tools` | 工具与技术数组 |
| `outputs` | 输出数组 |
| `details` | 当前过程下的明细项 |
| `label` | 明细项名称 |
| `note` | 补充说明,有才返回 |
---
### 3.9 八大绩效域
`GET /api/performance-domains.json`
```json
[
{ "id": "PD01", "name": "干系人绩效域" },
{ "id": "PD02", "name": "团队绩效域" }
]
```
---
### 3.10 单绩效域详情
`GET /api/performance-domains/{id}.json`
示例:
`GET /api/performance-domains/PD01.json`
```json
{
"id": "PD01",
"name": "干系人绩效域",
"expectedGoals": [
"与干系人建立高效的工作关系"
],
"keyPoints": [
"促进干系人的参与"
],
"interactions": [
"干系人为项目团队定义需求和范围并对其进行优先级排序。"
],
"checks": [
{
"goal": "与干系人建立高效的工作关系",
"indicators": [
"干系人参与的连续性。"
]
}
]
}
```
字段:
| 字段 | 含义 |
|---|---|
| `expectedGoals` | 预期目标 |
| `keyPoints` | 绩效要点 |
| `interactions` | 相互作用 |
| `checks` | 检查方法 |
| `goal` | 检查目标 |
| `indicators` | 检查指标 |
---
### 3.11 工件反查使用情况
用于回答:某个输入 / 输出从哪里来、流向哪里。
`GET /api/artifacts/{id}/usage.json`
示例:
`GET /api/artifacts/A001/usage.json`
```json
{
"id": "A001",
"name": "项目章程",
"asInput": [
{
"id": "P1.2",
"name": "制订项目管理计划",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"processGroupId": "PG02",
"processGroupName": "规划过程组",
"purpose": "生成一份综合文件,用于确定所有项目工作的基础及其执行方式。"
}
],
"asOutput": [
{
"id": "P1.1",
"name": "制定项目章程",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"processGroupId": "PG01",
"processGroupName": "启动过程组",
"purpose": "项目章程是正式批准项目并授权项目经理使用组织资源的文件。"
}
]
}
```
字段:
| 字段 | 含义 |
|---|---|
| `asInput` | 哪些过程把它作为输入 |
| `asOutput` | 哪些过程产出它 |
---
### 3.12 工具反查使用情况
用于回答:某个工具与技术在哪些过程中使用。
`GET /api/tools/{id}/usage.json`
示例:
`GET /api/tools/TT001/usage.json`
```json
{
"id": "TT001",
"name": "专家判断",
"usedIn": [
{
"id": "P1.1",
"name": "制定项目章程",
"knowledgeAreaId": "KA01",
"knowledgeAreaName": "项目整合管理",
"processGroupId": "PG01",
"processGroupName": "启动过程组",
"purpose": "项目章程是正式批准项目并授权项目经理使用组织资源的文件。"
}
]
}
```
字段:
| 字段 | 含义 |
|---|---|
| `usedIn` | 使用该工具与技术的过程数组 |
## 4. 常用调用示例
```text
得到某知识领域的裁剪因素:
/api/knowledge-areas/KA01/tailoring-factors.json
得到某知识领域下的所有子过程:
/api/knowledge-areas/KA01/processes.json
得到某过程组下的所有子过程:
/api/process-groups/PG02/processes.json
得到某过程的输入、输出、工具,包括明细项:
/api/processes/P1.1/itto.json
得到某绩效域详情:
/api/performance-domains/PD01.json
反查项目章程的来源和流向:
/api/artifacts/A001/usage.json
反查专家判断在哪些过程中使用:
/api/tools/TT001/usage.json
```