更新时间:2023-08-23 GMT+08:00
分享

查询应用侧角色列表

功能介绍

查询应用侧角色列表。

URI

GET /api/v2/tenant/applications/{application_id}/role-list

表1 路径参数

参数

是否必选

参数类型

描述

application_id

String

应用id。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

第几页。

limit

Integer

每页多少条。

最小值:10

最大值:100

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

该字段内容填为“application/json;charset=utf8”。

Authorization

String

认证凭据,值:Bearer {access_token},access_token通过“获取访问凭据”接口获取。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

total

Integer

总数

offset

Integer

第几页

limit

Integer

每页多少条

roles

Array of RoleInfoResult objects

角色信息集合

表5 RoleInfoResult

参数

参数类型

描述

id

String

角色id

code

String

角色code

name

String

角色名称

createdAt

String

创建时间

updatedAt

String

修改时间

状态码: 400

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误编号。

error_msg

String

错误详情。

请求示例

根据应用id分页查询应用侧角色列表,返回查询结果的前10条,如不满10条,则返回实际数量的结果。

GET https://{domain_name}/api/v2/tenant/applications/{application_id}/role-list?offset=0&limit=10

Authorization: Bearer 334963fc-1e4a-473b-9096-52a929140...

响应示例

状态码: 200

请求成功。

{
  "total" : 3,
  "offset" : 0,
  "limit" : 10,
  "roles" : [ {
    "id" : "20220415170305200-EF22-C2404E358",
    "code" : "role1",
    "name" : "role1",
    "createdAt" : "2022-04-15 17:03:05.200",
    "updatedAt" : null
  }, {
    "id" : "20220415170305223-7193-A01122B37",
    "code" : "role2",
    "name" : "role2",
    "createdAt" : "2022-04-15 17:03:05.223",
    "updatedAt" : null
  }, {
    "id" : "20220420144449385-C66D-E8C1D1D79",
    "code" : "admin",
    "name" : "管理员",
    "createdAt" : "2022-04-20 14:44:49.385",
    "updatedAt" : null
  } ]
}

状态码

状态码

描述

200

请求成功。

400

请求失败。

错误码

请参见错误码

分享:

    相关文档

    相关产品