更新时间:2025-12-01 GMT+08:00
分享

查询

场景描述

调用该接口查询角色。

接口方法

该接口仅支持GET方法,不支持PUT、POST和DELETE等方法。

接口URI

https://ip:port/agentgateway/resource/config/vdn/userclass?userClassIdSet=101,102

其中,ip为CC-Gateway服务器地址,port为CC-Gateway服务器的HTTPS端口号。

表1 URI中携带的参数说明

序号

参数名

数据类型

选取原则

说明

1

userClassIdSet

string

False

待查询角色id集合,中间以","分隔,最多一次可支持查询500个字符。

如果为空,则查询所有的角色

日志中的方法名

queryUserClass

请求消息

  • 消息头
    表2 消息头参数说明

    序号

    名称

    参数类型

    是否必选

    说明

    1

    Content-Type

    string

    True

    消息主体编码方式,缺省值:application/json; charset=UTF-8

    2

    Guid

    string

    True

    Guid的取值为C5 智能辅助类接口鉴权方式接口返回的guid。

响应消息

表3 消息体参数说明

序号

名称

参数类型

说明

1

message

string

描述

2

retcode

string

操作的结果原因码。

取值类型为整数。

3

result

array

查询角色结果信息的对象数组。该对象的参数说明请参见表4

表4 result结果定义说明

序号

名称

参数类型

说明

3.1

roleId

number

角色ID

3.2

name

string

角色名

3.3

roles

array

角色权限位说明

报文样例

  • 消息头
    Content-Type:application/json; charset=UTF-8
    Guid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • 请求参数

  • 响应参数
    {
        "message": "success",
        "retcode": "0",
        "result": [
            {
                "roleId": 101,
                "name": " TEST123",
                "roles": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    1,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                ]
            }
        ]
    }

相关文档