文档中心 > API类目 > 神鲸应用API

alibaba.ib.workcore.department.getalldepttree (递归获取部门树)

新增APPCODE

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
work_bench_context WorkBenchContext 可选 系统自动生成
  • └ campus_id
  • Number
  • 可选
  • 1
  • 园区id
  • └ system_id
  • String
  • 可选
  • 1
  • 系统id
  • └ company_id
  • Number
  • 可选
  • 11
  • 公司id
deptment_id Number 可选 11 部门id

响应参数

名称 类型 示例值 描述
result PojoResult {} 响应结果
  • └ error_level
  • String
  • 1
  • 错误等级
  • └ error_ext_info
  • String
  • {}
  • 错误其他属性
  • └ success
  • Boolean
  • true
  • 成功标示
  • └ error_msg
  • String
  • 请求出错
  • 错误信息
  • └ error_code
  • String
  • 10004
  • 错误码
  • └ request_id
  • String
  • 11
  • 请求ID
  • content
  • DeptmentTreeDto
  • {}
  • 部门信息对象
  • childs
  • Childs []
  • []
  • 子部门列表
  • └ name
  • String
  • 部门2
  • 部门名称
  • └ manager_id
  • String
  • 22
  • 管理员ID
  • └ company_id
  • Number
  • 1
  • 公司ID
  • └ super_dept_id
  • Number
  • 1
  • 父部门ID
  • └ id
  • Number
  • 2
  • 部门ID
  • └ short_name
  • String
  • 部门2
  • 部门简称
  • └ dept_name_path
  • String
  • /部门1/部门2
  • 部门路径
  • └ id
  • Number
  • 1
  • 部门ID
  • └ name
  • String
  • 部门1
  • 部门名称
  • └ super_dept_id
  • Number
  • 1
  • 父部门ID
  • └ dept_name_path
  • String
  • /部门1
  • 部门路径
  • └ short_name
  • String
  • 部门1
  • 部门简称
  • └ company_id
  • Number
  • 1
  • 公司ID

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIbWorkcoreDepartmentGetalldepttreeRequest req = new AlibabaIbWorkcoreDepartmentGetalldepttreeRequest();
AlibabaIbWorkcoreDepartmentGetalldepttreeRequest.WorkBenchContext obj1 = new AlibabaIbWorkcoreDepartmentGetalldepttreeRequest.WorkBenchContext();
obj1.setCampusId(1L);
obj1.setSystemId("1");
obj1.setCompanyId(11L);
req.setWorkBenchContext(obj1);
req.setDeptmentId(11L);
AlibabaIbWorkcoreDepartmentGetalldepttreeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ib_workcore_department_getalldepttree_response>
    <result>
        <error_level>1</error_level>
        <error_ext_info>{}</error_ext_info>
        <success>true</success>
        <error_msg>请求出错</error_msg>
        <error_code>10004</error_code>
        <request_id>11</request_id>
        <content>
            <childs>
                <childs>
                    <name>部门2</name>
                    <manager_id>22</manager_id>
                    <company_id>1</company_id>
                    <super_dept_id>1</super_dept_id>
                    <id>2</id>
                    <short_name>部门2</short_name>
                    <dept_name_path>/部门1/部门2</dept_name_path>
                </childs>
            </childs>
            <id>1</id>
            <name>部门1</name>
            <super_dept_id>1</super_dept_id>
            <dept_name_path>/部门1</dept_name_path>
            <short_name>部门1</short_name>
            <company_id>1</company_id>
        </content>
    </result>
</alibaba_ib_workcore_department_getalldepttree_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部