添加用户组

  • 接口说明: 添加用户组
  • 接口地址: /api/groups
  • 请求方式: POST

请求参数

参数名称类型是否必须描述
namestring用户组名称
typestring类型
colorstring颜色
iconstringicon
is_paidint是否付费用户组,0为免费,1为付费用户组
feefloat付费金额
daysint付费获得用户组权限天数

请求示例:

  1. {
  2. "data":{
  3. "type":"groups",
  4. "attributes":{
  5. "name":"test",
  6. "default":"",
  7. "is_paid":1,
  8. "fee":0.001,
  9. "days":3
  10. }
  11. }
  12. }

返回说明

  • 返回当前创建成功数据, http 状态码: 201

返回结果

返回示例

  1. {
  2. "data": {
  3. "type": "groups",
  4. "id": "35",
  5. "attributes": {
  6. "name": "test",
  7. "type": "",
  8. "color": "",
  9. "icon": "",
  10. "default": null,
  11. "isDisplay": false,
  12. "isPaid": true,
  13. "fee": 100,
  14. "days": 3
  15. }
  16. }
  17. }