黑名单

获取黑名单列表

API 定义:

  1. GET api/v3/banned/

请求示例:

  1. GET api/v3/banned/?_page=1&_limit=10000

返回数据:

  1. {
  2. "code": 0,
  3. "data": [],
  4. "meta": {
  5. "count": 0,
  6. "limit": 10000,
  7. "page": 1
  8. }
  9. }

创建黑名单

API 定义:

  1. POST api/v3/banned/

请求参数:

  1. {
  2. "who": "mqttjs_ab9069449e",
  3. "as": "client_id",
  4. "reason": "banned the clientId",
  5. "desc": "normal banned",
  6. "until": 1536146187
  7. }

请求示例:

  1. POST api/v3/banned/

返回数据:

  1. {
  2. "code": 0,
  3. "data": {
  4. "who": "mqttjs_ab9069449e",
  5. "as": "client_id",
  6. "reason": "banned the clientId",
  7. "desc": "normal banned",
  8. "until": 1536146187
  9. }
  10. }

删除指定黑名单

API 定义:

  1. DELETE api/v3/banned/${who}?as=${as}

请求示例:

  1. DELETE api/v3/banned/mqttjs_ab9069449e?as=client_id

返回数据:

  1. {
  2. "code": 0
  3. }