C
CIFP

Access Logs API

Query access logs via the REST API.

Query access logs for a proxy. Logs are recorded for every request proxied through CIFP, including denied and held requests.

List Access Logs

GET/api/proxies/:id/logs
bash
# Last 100 logs (default)
curl "https://cifp.vril.dev/api/proxies/proxy-id/logs" \
  -H "Authorization: Bearer cifp_your_api_key"

# Denied requests in the last 7 days
curl "https://cifp.vril.dev/api/proxies/proxy-id/logs?action=deny&from=2026-05-30T00:00:00Z&limit=200" \
  -H "Authorization: Bearer cifp_your_api_key"

# Search by URL
curl "https://cifp.vril.dev/api/proxies/proxy-id/logs?q=api.stripe.com" \
  -H "Authorization: Bearer cifp_your_api_key"

Query Parameters

ParameterTypeDescription
limitintegerMax logs to return. Default 100, max 500.
actionstringFilter: allow, deny, or hitl
statusintegerFilter by HTTP status code (e.g. 403, 200)
qstringSubstring match on the URL field
fromISO-8601Start of time range
toISO-8601End of time range (default: now)

Response Shape

Response
{
  "logs": [
    {
      "id":               "uuid",
      "proxyId":          "proxy-abc123",
      "timestamp":        "2026-06-06T09:15:22Z",
      "method":           "POST",
      "url":              "https://api.openai.com/v1/chat/completions",
      "srcIp":            "203.0.113.45",
      "statusCode":       200,
      "bytesTransferred": 4821,
      "duration":         312,
      "action":           "allow",
      "ruleMatched":      "allow-openai",
      "metadata": {
        "secretsUsed": ["OPENAI_API_KEY"]
      }
    }
  ],
  "count": 1
}