curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions" \
  -H "Authorization: Bearer your-jwt-token"
{
  "hasMore": false,
  "records": [
    {
      "sid": "exc_abc123def456ghi789jkl012",
      "accountSid": "acc_abc123def456ghi789jkl012",
      "name": "Health Check Exclusion",
      "description": "Excludes health check endpoints from monitoring",
      "pathPattern": "/health*",
      "method": "GET",
      "statusCode": null,
      "isActive": true,
      "createdAt": "2023-12-01T10:30:00.000Z"
    },
    {
      "sid": "exc_xyz789uvw012rst345abc",
      "accountSid": "acc_abc123def456ghi789jkl012",
      "name": "Static Assets",
      "description": "Excludes static asset requests",
      "pathPattern": "/static/*",
      "method": "*",
      "statusCode": null,
      "isActive": true,
      "createdAt": "2023-12-01T11:15:00.000Z"
    }
  ]
}

List Exclusions

Retrieve all exclusion rules configured for an account.

Path Parameters

accountSid
string
required
Account identifier (format: acc_ followed by 27 alphanumeric characters)

Headers

Authorization
string
required
Bearer token for authentication

Response

hasMore
boolean
Indicates if there are more records to paginate through
records
array
curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions" \
  -H "Authorization: Bearer your-jwt-token"
{
  "hasMore": false,
  "records": [
    {
      "sid": "exc_abc123def456ghi789jkl012",
      "accountSid": "acc_abc123def456ghi789jkl012",
      "name": "Health Check Exclusion",
      "description": "Excludes health check endpoints from monitoring",
      "pathPattern": "/health*",
      "method": "GET",
      "statusCode": null,
      "isActive": true,
      "createdAt": "2023-12-01T10:30:00.000Z"
    },
    {
      "sid": "exc_xyz789uvw012rst345abc",
      "accountSid": "acc_abc123def456ghi789jkl012",
      "name": "Static Assets",
      "description": "Excludes static asset requests",
      "pathPattern": "/static/*",
      "method": "*",
      "statusCode": null,
      "isActive": true,
      "createdAt": "2023-12-01T11:15:00.000Z"
    }
  ]
}

Get Exclusion

Retrieve details of a specific exclusion rule.

Path Parameters

accountSid
string
required
Account identifier
exclusionSid
string
required
Exclusion rule identifier

Headers

Authorization
string
required
Bearer token for authentication

Response

Returns a single exclusion object with the same structure as described in the List Exclusions response.
curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions/exc_abc123def456ghi789jkl012" \
  -H "Authorization: Bearer your-jwt-token"
{
  "sid": "exc_abc123def456ghi789jkl012",
  "accountSid": "acc_abc123def456ghi789jkl012",
  "name": "Health Check Exclusion",
  "description": "Excludes health check endpoints from monitoring",
  "pathPattern": "/health*",
  "method": "GET",
  "statusCode": null,
  "isActive": true,
  "createdAt": "2023-12-01T10:30:00.000Z"
}

Create Exclusion

Create a new exclusion rule to filter out unwanted requests from monitoring.

Path Parameters

accountSid
string
required
Account identifier

Headers

Authorization
string
required
Bearer token for authentication

Request Body

name
string
required
Name of the exclusion rule
description
string
Description of what this rule excludes
pathPattern
string
required
URL path pattern to match. Supports wildcards (*) and exact matches
method
string
required
HTTP method to match (GET, POST, PUT, DELETE, etc.) or * for all methods
statusCode
number
HTTP status code to match (optional, null means all status codes)
isActive
boolean
Whether this exclusion rule should be active (default: true)

Response

Returns the created exclusion object.
curl -X POST "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions" \
  -H "Authorization: Bearer your-jwt-token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Metrics Exclusion",
    "description": "Excludes internal metrics endpoints",
    "pathPattern": "/metrics/*",
    "method": "*",
    "isActive": true
  }'
{
  "sid": "exc_new789uvw012rst345def",
  "accountSid": "acc_abc123def456ghi789jkl012",
  "name": "Metrics Exclusion",
  "description": "Excludes internal metrics endpoints",
  "pathPattern": "/metrics/*",
  "method": "*",
  "statusCode": null,
  "isActive": true,
  "createdAt": "2023-12-01T15:45:00.000Z"
}

Update Exclusion

Update an existing exclusion rule.

Path Parameters

accountSid
string
required
Account identifier
exclusionSid
string
required
Exclusion rule identifier

Headers

Authorization
string
required
Bearer token for authentication

Request Body

name
string
required
Name of the exclusion rule
description
string
Description of what this rule excludes
pathPattern
string
required
URL path pattern to match
method
string
required
HTTP method to match or * for all methods
statusCode
number
HTTP status code to match (optional)
isActive
boolean
required
Whether this exclusion rule should be active

Response

Returns the updated exclusion object.
curl -X PUT "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions/exc_abc123def456ghi789jkl012" \
  -H "Authorization: Bearer your-jwt-token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Health Check Exclusion",
    "description": "Excludes all health check and status endpoints",
    "pathPattern": "/health*",
    "method": "*",
    "statusCode": 200,
    "isActive": true
  }'
{
  "sid": "exc_abc123def456ghi789jkl012",
  "accountSid": "acc_abc123def456ghi789jkl012",
  "name": "Updated Health Check Exclusion",
  "description": "Excludes all health check and status endpoints",
  "pathPattern": "/health*",
  "method": "*",
  "statusCode": 200,
  "isActive": true,
  "createdAt": "2023-12-01T10:30:00.000Z"
}

Delete Exclusion

Delete an exclusion rule.
Deleting an exclusion rule will cause previously excluded requests to be monitored again if they match other patterns.

Path Parameters

accountSid
string
required
Account identifier
exclusionSid
string
required
Exclusion rule identifier

Headers

Authorization
string
required
Bearer token for authentication

Response

sid
string
ID of the deleted exclusion rule
deleted
boolean
Flag indicating the exclusion rule was successfully deleted
curl -X DELETE "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/exclusions/exc_abc123def456ghi789jkl012" \
  -H "Authorization: Bearer your-jwt-token"
{
  "sid": "exc_abc123def456ghi789jkl012",
  "deleted": true
}

Path Pattern Examples

Exclusion rules support flexible path matching patterns:
/health
// Matches only: /health

Common Exclusion Patterns

Health Checks

{
  "name": "Health Checks",
  "pathPattern": "/health*",
  "method": "GET"
}

Static Assets

{
  "name": "Static Assets", 
  "pathPattern": "/static/*",
  "method": "*"
}

Internal APIs

{
  "name": "Internal APIs",
  "pathPattern": "/internal/*",
  "method": "*"
}

Successful Options Requests

{
  "name": "CORS Preflight",
  "pathPattern": "*",
  "method": "OPTIONS",
  "statusCode": 200
}

Admin Endpoints

{
  "name": "Admin Panel",
  "pathPattern": "/admin/*",
  "method": "*"
}