POST /rest/orgwise/2/department
接口说明
创建部门。
媒体类型
application/json
请求样例
{
"name": "开发二部",
"parent": "3",
"type": "DEPARTMENT",
"no": "D3",
"description": "",
"leader": "username",
"assignee": "username"
}
请求样例
{
"name": "公司名称"
}
请求BODY详情
参数 | 类型 | 描述 | 必填 |
|---|---|---|---|
| name | string | 部门名称 | 必填 |
| parent | string | 上级部门ID或编号 | 非必填。默认为空,表示创建的部门是TOP级别 |
| type | string | 组织类型 | 非必填。如果部门是TOP级别,则默认为”COMPANY“,否则默认为”DEPARTMENT“。可用的类型有 COMPANY, SUB_COMPANY, BRANCH_COMPANY, BLOC, DEPARTMENT, SUB_DEPARTMENT |
| no | string | 部门编号 | 非必填 |
| description | string | 描述 | 非必填 |
| leader | string | 部门负责人,Jira用户的用户名 | 非必填 |
| assignee | string | 部门经办人,Jira用户的用户名 | 非必填 |
返回示例
{
"code": 0,
"msg": "Success",
"data": {
"id": 163,
"no": "D174",
"name": "开发四部",
"type": "SUB_DEPARTMENT",
"parentDepartment": {},
"createTime": "2022-02-15 15:23:10.0"
}
}