API7 Docs

Update login failure restriction settings

PUT /api/system_settings/login_failure_restriction

PUT /api/system_settings/login_failure_restriction

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Request Body

application/json

Response Body

application/json

application/json

curl -X PUT "$API_BASE_URL/api/system_settings/login_failure_restriction" \  -H "Content-Type: application/json" \  -d '{    "enable": true,    "failure_threshold": 5,    "ban_duration_minutes": 15  }'

Successfully retrieved or updated the login failure restriction settings.

{
  "value": {
    "enable": true,
    "failure_threshold": 5,
    "ban_duration_minutes": 15
  }
}
Complete operation details and schema variants

PUT /api/system_settings/login_failure_restriction

Update login failure restriction settings

Update the policy that temporarily bans built-in users after too many consecutive failed login attempts, including the failure threshold and ban duration.

Required IAM Permission: Action iam:UpdateLoginFailureRestriction, Resource arn:api7:iam:organization/*

Parameters

Request body

Content type: application/json

  • enable (boolean, required): Enable temporarily banning built-in users after too many consecutive failed login attempts.
  • failure_threshold (integer, required): Number of consecutive failed login attempts that triggers a temporary login ban.
  • ban_duration_minutes (integer, required): How long, in minutes, a triggered login ban lasts.

Responses

  • 200: Successfully retrieved or updated the login failure restriction settings.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional):
  • value.enable (boolean, required): Enable temporarily banning built-in users after too many consecutive failed login attempts.
  • value.failure_threshold (integer, required): Number of consecutive failed login attempts that triggers a temporary login ban.
  • value.ban_duration_minutes (integer, required): How long, in minutes, a triggered login ban lasts.
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X PUT '$API_BASE_URL/api/system_settings/login_failure_restriction'