添加角色
POST
/myauth/web/addRole
请求参数
Header 参数
token
string
必需
示例值:
a69646cc85b84b79a5c04c4929e22660
Body 参数application/json
name
string
角色名称
fromSoftId
integer
所属软件ID
discount
integer
折扣
meunList
array[string]
拥有菜单权限列表
示例
{
"name": "代理商3",
"fromSoftId": 1,
"discount": 80,
"meunList": [
"da3af6df-cd00-4746-b788-bd2dfeab716f",
"922666ba-1ed1-4b6b-9043-30aeead1eebe",
"23a8778f-9424-449a-a68e-54b12e4c30f3",
"cd256048-3f8e-4fb7-ada3-55d538ce7611"
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/myauth/web/addRole' \
--header 'token: a69646cc85b84b79a5c04c4929e22660' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "代理商3",
"fromSoftId": 1,
"discount": 80,
"meunList": [
"da3af6df-cd00-4746-b788-bd2dfeab716f",
"922666ba-1ed1-4b6b-9043-30aeead1eebe",
"23a8778f-9424-449a-a68e-54b12e4c30f3",
"cd256048-3f8e-4fb7-ada3-55d538ce7611"
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
success
boolean
必需
msg
string
必需
sign
string
必需
result
null
必需
timestamp
integer
必需
示例
{
"code": 200,
"success": true,
"msg": "添加成功",
"sign": "",
"result": null,
"timestamp": 1647066731417
}
🔴500错误
修改于 2022-03-13 06:44:00