文档中心 > API类目 > 智慧园区API

alibaba.campus.acl.checkemprole (校验用户是否有该角色)

校验用户是否有该权限

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
company_id Number 可选 1 公司id不填默认为SYS_000
system_id String 必须 1008 系统id
campus_id Number 必须 1 园区id
account_id String 必须 1008 员工账号
item_key String 必须 ROLE_1234 角色id

响应参数

名称 类型 示例值 描述
result PojoResult result
  • └ content
  • Boolean
  • true
  • 返回结果
  • └ error_code
  • String
  • 500
  • 错误码
  • └ error_msg
  • String
  • roleId不能为null
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否调用成功
  • └ error_level
  • String
  • 1
  • 错误级别

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusAclCheckemproleRequest req = new AlibabaCampusAclCheckemproleRequest();
req.setCompanyId(1L);
req.setSystemId("1008");
req.setCampusId(1L);
req.setAccountId("1008");
req.setItemKey("ROLE_1234");
AlibabaCampusAclCheckemproleResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_acl_checkemprole_response>
    <result>
        <content>true</content>
        <error_code>500</error_code>
        <error_msg>roleId不能为null</error_msg>
        <success>true</success>
        <error_level>1</error_level>
    </result>
</alibaba_campus_acl_checkemprole_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

返回
顶部