# GET /domains/{name}/modsec/requests

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the domains group.

List requests ModSecurity blocked or would have blocked for a domain

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

Returns requests newest first. Each entry includes the time, domain, visitor's IP address, request, HTTP status returned, score, and the rules that contributed to the score, including what each rule matched. The response reports how far the list lags behind, measured by the age of the oldest record the sorting job has yet to process.

Use state=refused for blocked requests or state=would for requests that would have been blocked in logging mode. Omit state to include both. The limit parameter accepts 1 to 200 and defaults to 50. Pass the returned next cursor as before to get the following page. Empty filter values are ignored. The API returns 400 for a nonempty filter value in an invalid format.

The domain's owner, the reseller who manages the owner, and administrators can view the list. For callers other than administrators, disabled_by_name is null for rules disabled by an administrator.

## As a command

- [urbestack-modsec-requests](https://urbestack.com/docs/commands/urbestack-modsec-requests.md): Lists requests ModSecurity blocked or would have blocked in logging mode, newest first.

## Parameters

- `name` (path, DomainName, required)
- `address` (query, string): IP address or IP address prefix of 2 to 45 characters. A prefix must end in a dot or colon.
- `rule` (query, integer): Rule number of 1 to 7 digits.
- `state` (query, string, one of refused, would)
- `before` (query, string): Cursor returned as next by the previous page.
- `limit` (query, integer, 1 to 200)

## 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/domains/example.com/modsec/requests?address=info@example.com&rule=1&state=refused&before=text&limit=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "behind_seconds": 1,
  "caught_up_at": "text",
  "next": "text",
  "partial": true,
  "requests": [
    {
      "address": "info@example.com",
      "at": "text",
      "domain": "example.com",
      "headers": {
        "content_length": "text",
        "content_type": "text",
        "host": "text",
        "referer": "text",
        "user_agent": "text"
      },
      "host": "text",
      "id": 1,
      "kind": "rules",
      "method": "text",
      "now": {
        "limit": 1,
        "passes": true,
        "score": 1
      },
      "protocol": "text",
      "refused": true,
      "rules": [
        {
          "disabled": "domain",
          "disabled_at": "text",
          "disabled_by": "owner",
          "disabled_by_name": "text",
          "gone": true,
          "group": "text",
          "id": 1,
          "matched_in": "text",
          "matched_text": "text",
          "message": "text",
          "own": true,
          "score": 1,
          "severity": "text"
        }
      ],
      "score": 1,
      "status": 1,
      "uri": "text"
    }
  ],
  "waiting": 1,
  "your_address": "text"
}
```

## Errors

- 400: <k> is not in a form the list takes
- 400: A rule is named by its number
- 400: A state is refused or would
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 400: before is the cursor a page of the list answered
- 401: Authentication required
- 404: Domain '<domain>' not found
