Enterprise¶
企业是组织的上层空间。通过 API 可以管理企业成员及其角色,查看企业自定义角色与关联组织,维护企业里程碑、企业标签以及企业 Issue 的自定义字段。
本组接口全部走 /api/v8 前缀,与其他分组的 /api/v5 不同;企业成员接口在组织分组里另有 /api/v5 版本。
对象¶
| 对象 | 说明 | 相关接口 |
|---|---|---|
| 企业成员 | 成员列表、单人详情、邀请、移除、角色权限 | 列出企业的所有成员 |
| 自定义角色 | 企业级角色定义 | 获取企业自定义角色 |
| 关联组织 | 组织所属的企业关系 | 获取组织关联的企业 |
| 企业里程碑 | 里程碑的增删改查与关联项目 | 获取企业里程碑列表 |
| 企业标签 | 标签的创建、更新、删除 | 创建企业标签 |
| Issue 扩展字段 | 企业 Issue 的自定义字段定义(只读) | 获取企业 Issue 自定义字段 |
| 企业 Issue | 企业维度的 Issue 列表 | 获取企业 Issue 列表 |
标识方式¶
- 企业用
enterprise或enterprise_id标识(两种占位符在本组混用,按具体接口页为准)。 - 成员用
username,里程碑用milestone_id,标签用label_id。 - 组织关联企业的接口用单数
org:/api/v8/org/{org}/enterprise。
常见任务¶
注意事项¶
- 全组走
/api/v8:与组织分组里企业成员那几个/api/v5接口同义不同版,路径不能互换,返回字段也可能不同。 - 占位符混用:有的接口写
{enterprise},有的写{enterprise_id};自定义角色用单数enterprise,组织关联企业用单数org。 - 企业标签的路径段是单数
label(不是labels),且创建/更新/删除都在/label下。 - 企业 Issue 用
POST取列表(不是GET),与仓库 Issue 的GET习惯相反。 - 企业成员与组织成员是两套接口,企业侧角色枚举含浏览者、测试人、研发等,与组织侧不同。
接口列表¶
本模块共 18 个接口。
| # | 接口 | 方法与路径 | 说明 |
|---|---|---|---|
| 1 | 获取企业的一个成员 | GET /api/v8/enterprises/{enterprise}/members/{username} |
用户调用此接口,进行获取企业的一个成员操作. |
| 2 | 列出企业的所有成员 | GET /api/v8/enterprises/{enterprise}/members |
用户调用此接口,进行列出企业的所有成员操作. |
| 3 | 邀请企业成员 | POST /api/v8/enterprises/{enterprise}/memberships/{username} |
用户调用此接口,进行邀请企业成员操作. |
| 4 | 删除企业成员 | DELETE /api/v8/enterprises/{enterprise}/members/{username} |
用户调用此接口,进行删除企业成员操作. |
| 5 | 修改企业成员权限 | PUT /api/v8/enterprises/{enterprise}/members/{username} |
用户调用此接口,进行修改企业成员权限操作. |
| 6 | 获取组织关联的企业 | GET /api/v8/org/{org}/enterprise |
用户调用此接口,进行获取组织关联的企业操作. |
| 7 | 获取企业自定义角色 | GET /api/v8/enterprise/{enterprise_id}/customized_roles |
用户调用此接口,进行获取企业自定义角色操作. |
| 8 | 创建企业里程碑 | POST /api/v8/enterprises/{enterprise}/milestones |
用户调用此接口,进行创建企业里程碑操作. |
| 9 | 修改企业里程碑 | PUT /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
用户调用此接口,进行修改企业里程碑操作. |
| 10 | 获取企业里程碑详情 | GET /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
用户调用此接口,进行获取企业里程碑详情操作. |
| 11 | 删除企业里程碑 | DELETE /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
用户调用此接口,进行删除企业里程碑操作. |
| 12 | 获取企业里程碑列表 | GET /api/v8/enterprises/{enterprise}/milestones |
用户调用此接口,进行获取企业里程碑列表操作. |
| 13 | 获取企业里程碑可以关联的项目列表 | GET /api/v8/enterprises/{enterprise}/groups/projects |
用户调用此接口,进行获取企业里程碑可以关联的项目列表操作. |
| 14 | 获取企业Issue自定义字段列表 | GET /api/v8/enterprises/{enterprise_id}/issue_extend_field |
用户调用此接口,进行获取企业Issue自定义字段列表操作. |
| 15 | 获取企业Issue列表 | POST /api/v8/enterprises/{enterprise_id}/issues |
用户调用此接口,进行获取企业Issue列表操作. |
| 16 | 创建企业标签 | POST /api/v8/enterprises/{enterprise_id}/label |
用户调用此接口,进行创建企业标签操作. |
| 17 | 更新企业标签 | PUT /api/v8/enterprises/{enterprise_id}/label/{label_id} |
用户调用此接口,进行更新企业标签操作. |
| 18 | 删除企业标签 | DELETE /api/v8/enterprises/{enterprise_id}/label/{label_id} |
用户调用此接口,进行删除企业标签操作. |
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 gitcode-dev/atomgit-api-doc