子账户管理
子账户列表
版本: v1
接口信息
- 请求方式:
GET - 请求地址:
/console/v1/sub_account
请求参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| page | int | 否 | - | 页数 |
| limit | int | 否 | - | 每页条数 |
| orderby | string | 否 | - | 排序 |
| sort | string | 否 | - | 升/降序 |
返回参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| list | array | 否 | - | 子账户 |
| list[].id | int | 否 | - | 子账户ID |
| list[].status | int | 否 | - | 状态0禁用1启用 |
| list[].username | string | 否 | - | 账户名 |
| list[].last_action_time | string | 否 | - | 上次使用时间 |
| count | int | 否 | - | 子账户总数 |
子账户详情
版本: v1
接口信息
- 请求方式:
GET - 请求地址:
/console/v1/sub_account/:id
返回参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| account | object | 否 | - | 子账户 |
| account.id | int | 否 | - | 子账户ID |
| account.username | string | 否 | - | 账户名 |
| account.email | string | 否 | - | 邮箱 |
| account.phone_code | int | 否 | - | 国际电话区号 |
| account.phone | string | 否 | - | 手机号 |
| account.auth | array | 否 | - | 权限 |
| account.notice | array | 否 | - | 通知product产品marketing营销ticket工单cost费用recommend推介system系统 |
| account.project_id | array | 否 | - | 项目ID |
| account.visible_product | string | 否 | - | 可见产品:module模块host具体产品 |
| account.module | array | 否 | - | 模块 |
| account.host_id | array | 否 | - | 产品ID |
创建子账户
版本: v1
接口信息
- 请求方式:
POST - 请求地址:
/console/v1/sub_account
请求参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| username | string | 是 | - | 账户名 |
| string | 否 | - | 邮箱 | |
| phone_code | int | 否 | - | 国际电话区号 |
| phone | string | 否 | - | 手机号 |
| password | string | 是 | - | 密码 |
| project_id | array | 否 | - | 项目ID |
| visible_product | string | 否 | - | 可见产品:module模块host具体产品 |
| module | array | 否 | - | 模块 |
| host_id | array | 否 | - | 产品ID |
| auth | array | 是 | - | 权限 |
| notice | array | 是 | - | 通知product产品marketing营销ticket工单cost费用recommend推介system系统 |
编辑子账户
版本: v1
接口信息
- 请求方式:
PUT - 请求地址:
/console/v1/sub_account/:id
请求参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| id | int | 是 | - | 子账户ID |
| string | 否 | - | 邮箱 | |
| phone_code | int | 否 | - | 国际电话区号 |
| phone | string | 否 | - | 手机号 |
| password | string | 是 | - | 密码 |
| project_id | array | 否 | - | 项目ID |
| visible_product | string | 否 | - | 可见产品:module模块host具体产品 |
| module | array | 否 | - | 模块 |
| host_id | array | 否 | - | 产品ID |
| auth | array | 是 | - | 权限 |
| notice | array | 是 | - | 通知product产品marketing营销ticket工单cost费用recommend推介system系统 |
删除子账户
版本: v1
接口信息
- 请求方式:
DELETE - 请求地址:
/console/v1/sub_account/:id
请求参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| id | int | 是 | - | 子账户ID |
子账户状态切换
版本: v1
接口信息
- 请求方式:
PUT - 请求地址:
/console/v1/sub_account/:id/status
请求参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| id | int | 是 | - | 子账户ID |
| status | int | 否 | - | 状态0禁用1启用 |
当前子账户权限列表
版本: v1
接口信息
- 请求方式:
GET - 请求地址:
/console/v1/sub_account/:id/auth
返回参数
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| list | array | 否 | - | 权限列表 |
| list[].id | int | 否 | - | 权限ID |
| list[].title | string | 否 | - | 权限标题 |
| list[].url | string | 否 | - | 地址 |
| list[].order | int | 否 | - | 排序 |
| list[].parent_id | int | 否 | - | 父级ID |
| list[].child | array | 否 | - | 权限子集 |
| list[].child[].id | int | 否 | - | 权限ID |
| list[].child[].title | string | 否 | - | 权限标题 |
| list[].child[].url | string | 否 | - | 地址 |
| list[].child[].order | int | 否 | - | 排序 |
| list[].child[].parent_id | int | 否 | - | 父级ID |
| list[].child[].child | array | 否 | - | 权限子集 |
| list[].child[].child[].id | int | 否 | - | 权限ID |
| list[].child[].child[].title | string | 否 | - | 权限标题 |
| list[].child[].child[].url | string | 否 | - | 地址 |
| list[].child[].child[].order | int | 否 | - | 排序 |
| list[].child[].child[].parent_id | int | 否 | - | 父级ID |
| rules | array | 否 | - | 权限规则 |