REST action reference

Read analytics

Read analytics. REST and MCP call the same domain service, so a successful invocation returns the same canonical result.

Request schema

Unknown fields are rejected. Path parameters merge with the JSON body or query input before validation. Test accepts up to 30 days; Live accepts 90 days.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "days": {
      "default": 30,
      "type": "integer",
      "minimum": 1,
      "maximum": 90,
      "description": "Date range in days. Test accepts 1-30; Live accepts 1-90."
    }
  },
  "required": [
    "days"
  ],
  "additionalProperties": false
}

Example request

{
  "days": 30
}

Response schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next_cursor"
  ],
  "additionalProperties": false
}

Example success response

REST returns JSON. MCP returns the same object in structuredContent plus a transport request ID.

{
  "data": [],
  "next_cursor": null
}

Errors and recovery

Common statuses: 422 invalid input, 403 missing scope or organization access, 404 not found, 409 revision or idempotency conflict, 429 rate limit, 504 deadline exceeded. In Test, ranges over 30 days return TEST_RETENTION_RANGE.Include the request ID from the error envelope when you contact support.

Idempotency and deadlines

This read does not require an idempotency key.Server deadline: 5s. Retry only when error.retryable is true.

cURL

curl https://abusezero.com/v1/analytics \
  -H "Authorization: Bearer $ABUSEZERO_SECRET_KEY" \
  -H "AbuseZero-Organization: $ABUSEZERO_ORGANIZATION"

Node SDK

const result = await abusezero.call("/v1/analytics", {
  method: "GET",
});

MCP

abusezero_get_analytics({
  "days": 30
})