View .md

Blocked IPs endpoints (Admin API)

3 FeatherPanel Admin API endpoints from admin/blocked-ips.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/blocked-ips.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/blocked-ips

Auth: AdminPermission: admin.blocked_ips.viewRoute name: admin-blocked-ipsController: BlockedIpsController::indexroute source

List banned panel IPs

ParameterInTypeRequiredDescription
pagequeryintegerno
limitqueryintegerno
searchquerystringno
active_onlyquerybooleanno
curl -X GET "$PANEL_URL/api/admin/blocked-ips" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 OK · 401 Unauthorized

PUT/api/admin/blocked-ips

Auth: AdminPermission: admin.blocked_ips.createRoute name: admin-blocked-ips-createController: BlockedIpsController::createroute source

Ban an IP from panel registration

Body fieldTypeRequiredDescription
ipstringyesIPv4/IPv6 or CIDR
reasonstringno
durationstringnoTimestring e.g. 1m, 1h, 24h, 7d, 1w, 1h30m; empty/permanent = forever
expires_atstringnoExplicit UTC/ISO expiry; overrides duration when set
curl -X PUT "$PANEL_URL/api/admin/blocked-ips" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"ip":"","reason":"","duration":"","expires_at":""}'

Responses: 201 Created · 400 Validation error · 409 Duplicate

DELETE/api/admin/blocked-ips/{id}

Auth: AdminPermission: admin.blocked_ips.deleteRoute name: admin-blocked-ips-deleteController: BlockedIpsController::deleteroute source

Remove a panel IP ban

ParameterInTypeRequiredDescription
idpath-yes
curl -X DELETE "$PANEL_URL/api/admin/blocked-ips/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Removed · 404 Not found