Banned

Add a client ID, username or IP address to the blacklist.

post/banned

Request

  • Base URL: https://docs.emqx.com/api/v5
  • URL: https://docs.emqx.com/api/v5/banned
  • Auth: one of:
    • HTTP basic
    • bearerAuth (a scheme the document does not define)

Request body

as'clientid' | 'username' | 'peerhost' required

Ban method, which can be client ID, username or IP address.

whostring required

Ban object, specific client ID, username or IP address.

bystring

Initiator of the ban.

reasonstring

Ban reason, record the reason why the current object was banned.

Example request

{
  "as": "username",
  "who": "Banned name",
  "by": "mgmt_api",
  "reason": "Too many requests",
  "at": 1640995200,
  "until": 1640995200
}

Response

Example response

{
  "data": [
    {
      "as": "username",
      "who": "Banned name",
      "by": "mgmt_api",
      "reason": "Too many requests",
      "at": 1640995200,
      "until": 1640995200
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.