GET/v1/guardrails/{guardrail_id}/decisions

Read guardrail decisions

Counts for one guardrail over the window. In observe mode, matched is what enforce would have blocked. A check stores counts only, never request content.

Authentication: Bearer API key in the Authorization header

Path parameters

  • guardrail_idstringrequired

    The guardrail id.

Query parameters

  • windowenum

    Lookback window ending now.

    "24h""7d""30d"
    Default: "7d"

Responses

  • 200

    The counts.

    Response
    • windowenumrequired
      "24h""7d""30d"
    • checkedintegerrequired

      Requests the guardrail checked.

    • matchedintegerrequired

      Requests where a rule matched.

    • blockedintegerrequired

      Matched requests that were refused. Always 0 in observe mode.

    • errorsintegerrequired

      Checks that did not finish in time, and requests with content the check could not read.

    • by_tagarray<object>required

      Matches per tag.

      by_tag
      • tagstringrequired
      • matchedintegerrequired
  • 401

    Missing, unknown or revoked API key.

  • 403

    The key is not a provisioning key, or the resource is read-only (tag_read_only, guardrail_read_only).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 404

    The resource does not exist or belongs to another organization. An organization without access gets this answer on every route.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

Request

curl 'https://api.experientiallabs.ai/v1/guardrails/00000000-0000-4000-8000-000000000011/decisions?window=7d' \
  -H "Authorization: Bearer <YOUR_API_KEY>"

Response

{
  "window": "7d",
  "checked": 18234,
  "matched": 41,
  "blocked": 0,
  "errors": 3,
  "by_tag": [
    {
      "tag": "internalConfidential",
      "matched": 41
    }
  ]
}

https://api.experientiallabs.ai/v1/guardrails/00000000-0000-4000-8000-000000000011/decisions?window=7d