菜单

用户管理API

一、获取用户列表

1、接口说明

(1)获取公司下启用+禁用状态的用户列表
 
(2)QPM限频为60,一分钟内请求超过60次会返回“请求太频繁”,需要等下一分钟才能再请求
 
 

2、接口路径

POST https://xmp-open.mobvista.com/v1/media/user/list

 

3、请求参数

公共请求参数:请参考 接口请求协议

Body
参数 类型 必填 说明
team_id []int N 部门id
user_id []int N 用户id
email []istring N 用户邮箱
 

4、请求示例

{
    "client_id": "xxxx",
    "timestamp": 1608776690,
    "sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
    "team_id":[123,124],
    "user_id":[1234,1234]
}

 

5、返回参数

参数 类型 说明
code int 错误码
msg string 消息
data array 返回的接口内容
data.user_id int 用户id
data.user_name string 用户名称
data.team_id int 部门id
data.team_name string 部门名称
data.team_type int 部门类型,0为Admin部门,1为优化部门,2为设计部门,3为数据分析部门
data.email string 邮箱
data.role_id int 角色类型,1为公司管理员,2为优化经理,3为设计经理,4为优化师,5为设计师,6为子管理员,7为数据分析经理,8为数据分析师
data.status int 状态,1为启用,2为禁用
data.created_time date 创建时间
 
 

6、返回示例

{
    "code": 0,
    "msg": "success",
    "data": [
        {
            "user_id": 1234,
            "user_name": "testyhs",
            "team_id": 123,
            "team_name": "test优化师",
            "team_type": 1,
            "email": "xxxx@xxx.com",
            "role_Id": 4,
            "status": 0,
            "created_time": "2022-03-04 15:28:46"
        }
    ]
}

 

二、创建部门

1、接口说明

QPM限频为120,一分钟内请求超过120次会返回“请求太频繁”,需要等下一分钟才能再请求
 
 

2、接口路径

POST https://xmp-open.mobvista.com/v1/media/team/add

 

3、请求参数

公共请求参数:请参考 接口请求协议

Body
参数 类型 必填 说明
team_name string Y 部门名称,限制20个字符
team_type int Y 部门类型,1:优化部门,2:设计部门
user_name string Y 部门经理用户名
email string Y 部门经理邮箱
password string Y 密码(明文密码MD5)
plain_password string Y 明文密码(英文小大写+数字,长度8-20位)
 

4、请求示例

{
    "client_id": "xmp",
    "timestamp": 1705634588,
    "sign": "xxx",
    "team_name": "部门#000",
    "team_type": 1,
    "user_name": "manage#000",
    "email": "manage#000@example.com",
    "plain_password": "password",
    "password": "5f4dcc3b5aa765d61d8327deb882cf99"
}

 

5、返回参数

参数 类型 说明
code int 非0表示失败
msg string 消息
data object 返回的接口内容
data.id string 部门id
data.leader string 部门经理用户id
data.company_id string 公司id
data.name string 部门名称
data.team_type string 部门类型
 

6、返回示例

{
    "code": 0,
    "msg": "success",
    "data": {
        "id": "3806",
        "company_id": "7",
        "name": "部门#000",
        "team_type": "OPTIMIZE",
        "leader": "371779"
    }
}

 

三、创建用户

1、接口说明

QPM限频为120,一分钟内请求超过120次会返回“请求太频繁”,需要等下一分钟才能再请求
 
 

2、接口路径

POST https://xmp-open.mobvista.com/v1/media/user/add

 

3、请求参数

公共请求参数:请参考 接口请求协议

Body
参数 类型 必填 说明
user_name string Y 用户名
role_id int Y 角色类型,2为优化经理,3为设计经理,4为优化师,5为设计师
team_id int Y 部门id
email string Y 用户邮箱
password string Y 明文密码(英文小大写+数字,长度8-20位)
 

4、请求示例

{
    "client_id": "xmp",
    "timestamp": 1705634588,
    "sign": "xxx",
    "role_id": 2,
    "team_id": 2746,
    "user_name": "manage12222214",
    "email": "manage1223212212@mobvista.com",
    "password": "12345"
}

 

5、返回参数

参数 类型 说明
code int 错误码
msg string 消息
data array 返回的接口内容
data.user_name int 用户名
data.id string 用户id
data.team_id int 部门id
data.company_id string 公司id
data.role_id int 角色类型
data.email string 用户邮箱
 
 

6、返回示例

{
    "code": 0,
    "msg": "success",
    "data": {
        "id": "371779",
        "company_id": "7",
        "team_id": "3806",
        "role_id": "1",
        "user_name": "manage#000",
        "email": "manage#000@example.com"
    }
}

 

上一个
广告管理API
下一个
枚举值
最近修改: 2024-11-22Powered by