# 说明

查询用户组

# url

https://api.tapd.cn/roles/get_role_by_name

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
workspace_id 是 integer 项目id
name 是 string 用户组名称,对数组做json_encode

# 调用示例及返回结果

# 查询用户组

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://api.tapd.cn/roles/get_role_by_name?workspace_id=62916187&name=[%22%E7%AE%A1%E7%90%86%E5%91%98%22%2C%20%22%E6%99%AE%E9%80%9A%E6%88%90%E5%91%98%22]'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "id": "1000000000000000002",
            "name": "管理员",
            "workspace_id": "0",
            "description": "Workspace Admin",
            "role_type": "1"
        },
        {
            "id": "1000000000000000089",
            "name": "普通成员",
            "workspace_id": "0",
            "description": "Normal User",
            "role_type": "1"
        }
    ],
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# 返回字段说明

字段 说明
data 执行结果
上次更新: 2026-08-19 14:58:44