Get your free beta license ↗
API operation · security group
GET

/security/modsec/requests

First published 19 Nov 20260.2.30Unchanged since publication

List requests ModSecurity refused or would have refused in logging mode

Who may call it
AdministratorResellerCustomer
Token scope, any of
securityreadall
Answers200 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 and what each matched. Omit domain to include all domains and requests with no matching UrbeStack domain. Use state=refused for blocked requests or state=would for requests that would have been blocked in logging mode.

Use limit to set the page size from 1 to 200, with a default of 50. Pass the next cursor as before to retrieve the following page. The response reports how far behind the list is, measured by the age of the oldest record the sorting job has yet to process. The API returns 400 for malformed nonempty values of address, rule, state, before, or limit.

As a command

Run as root on the server

Parameters

domainquery ·string
Domain name to filter by, up to 253 characters after UrbeStack lowercases it and removes any trailing dot.
addressquery ·string
Visitor's IP address or IP address prefix ending in a dot or colon, from 2 to 45 characters.
rulequery ·integer
Rule number to match, with up to 7 digits.
statequery ·string, one of refused, would
beforequery ·string
Cursor returned as next on the preceding page.
limitquery ·integer, 1 to 200

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/security/modsec/requests?domain=example.com&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
}

Errors

9 errors, each a status and a sentence
400<k> is not in a form the list takes
400A rule is named by its number
400A state is refused or would
400Domain name required
400Domain name too long
400Invalid domain name
400before is the cursor a page of the list answered
401Authentication required
404Domain '<domain>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/api/get-security-modsec-requests/