View .md

Rate Limits endpoints (Admin API)

6 FeatherPanel Admin API endpoints from admin/rate-limits.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 15b94e9 on .

On this page

Defined in backend/app/routes/admin/rate-limits.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/admin/rate-limits

Auth: AdminPermission: admin.settings.viewRoute name: admin-rate-limitsController: RateLimitController::indexroute source

Get all rate limit configurations Retrieve all rate limit configurations for routes

Response data fieldTypeDescription
_enabledbooleanGlobal rate limiting enabled flag
routesobjectRate limit configurations by route name
curl -X GET "$PANEL_URL/api/admin/rate-limits" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Rate limit configurations retrieved successfully

GET/api/admin/rate-limits/{routeName}

Auth: AdminPermission: admin.settings.viewRoute name: admin-rate-limits-showController: RateLimitController::showroute source

Get rate limit configuration for a route Retrieve rate limit configuration for a specific route

ParameterInTypeRequiredDescription
routeNamepathstringyesThe route name

Response data: RateLimitRoute

Response data fieldTypeDescription
route_namestringThe route name
per_secondintegerRate limit per second
per_minuteintegerRate limit per minute
per_hourintegerRate limit per hour
per_dayintegerRate limit per day
namespacestringNamespace for rate limiting
curl -X GET "$PANEL_URL/api/admin/rate-limits/$ROUTE_NAME" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Rate limit configuration retrieved successfully · 404 Route not found

PUT/api/admin/rate-limits/{routeName}

Auth: AdminPermission: admin.settings.editRoute name: admin-rate-limits-updateController: RateLimitController::updateroute source

Update rate limit configuration for a route Update rate limit configuration for a specific route

ParameterInTypeRequiredDescription
routeNamepathstringyesThe route name
Body fieldTypeRequiredDescription
_enabledbooleannoEnable or disable rate limiting for this route
per_secondintegerno
per_minuteintegerno
per_hourintegerno
per_dayintegerno
namespacestringno
curl -X PUT "$PANEL_URL/api/admin/rate-limits/$ROUTE_NAME" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"_enabled":false,"per_second":0,"per_minute":0,"per_hour":0,"per_day":0,"namespace":""}'

Plugin events: featherpanel:rate-limiter:update

Responses: 200 Rate limit configuration updated successfully · 400 Invalid request data · 500 Failed to update configuration

DELETE/api/admin/rate-limits/{routeName}

Auth: AdminPermission: admin.settings.editRoute name: admin-rate-limits-deleteController: RateLimitController::deleteroute source

Delete rate limit configuration for a route Delete (reset) rate limit configuration for a specific route, reverting to developer defaults

ParameterInTypeRequiredDescription
routeNamepathstringyesThe route name
curl -X DELETE "$PANEL_URL/api/admin/rate-limits/$ROUTE_NAME" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:rate-limiter:delete

Responses: 200 Rate limit configuration deleted successfully · 404 Route not found

PATCH/api/admin/rate-limits/bulk

Auth: AdminPermission: admin.settings.editRoute name: admin-rate-limits-bulk-updateController: RateLimitController::bulkUpdateroute source

Bulk update rate limit configurations Update multiple rate limit configurations at once

Body fieldTypeRequiredDescription
routesobjectno
curl -X PATCH "$PANEL_URL/api/admin/rate-limits/bulk" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"routes":{}}'

Plugin events: featherpanel:rate-limiter:bulk:update

Responses: 200 Rate limit configurations updated successfully · 400 Invalid request data

PATCH/api/admin/rate-limits/global

Auth: AdminPermission: admin.settings.editRoute name: admin-rate-limits-globalController: RateLimitController::updateGlobalroute source

Update global rate limiting enabled state Enable or disable rate limiting globally for all routes

Body fieldTypeRequiredDescription
_enabledbooleannoEnable or disable rate limiting globally
curl -X PATCH "$PANEL_URL/api/admin/rate-limits/global" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"_enabled":false}'

Plugin events: featherpanel:rate-limiter:global:update

Responses: 200 Global rate limiting state updated successfully · 400 Invalid request data