# GET /security/jails

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the security group.

List ban rules

- Who may call it: administrator
- Token scope, any of: security, read, all
- Answers: 200 OK

The response lists rules shipped with UrbeStack first, followed by custom rules in name order. Each entry includes its log file or journal, filter or pattern, attempt threshold, time window and ban duration in seconds, scope, and number of bans issued in the past 7 days.

The response shows whether each rule is enabled and whether fail2ban is running it. An enabled rule that uses a log file waits for the file to exist. The service_list field contains each service's key and label.

## As a command

- [urbestack-jail-list](https://urbestack.com/docs/commands/urbestack-jail-list.md): Lists the ban rules shipped with UrbeStack, followed by custom rules in name order.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/security/jails" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "jails": [
    {
      "active": true,
      "bans_week": 1,
      "bantime": 1,
      "created_at": "2026-09-09T10:15:00Z",
      "enabled": true,
      "filter": "text",
      "inactive_reason": "text",
      "journal": "text",
      "log": "",
      "name": "alice",
      "pattern": "text",
      "scope": "all",
      "service": "text",
      "shipped": true,
      "tries": 1,
      "what": "text",
      "window": 1
    }
  ]
}
```

## Errors

- 401: Authentication required
