List Exclusions
Retrieve all exclusion rules configured for an account.
Path Parameters
Account identifier (format: acc_
followed by 27 alphanumeric characters)
Bearer token for authentication
Response
Indicates if there are more records to paginate through
Unique exclusion rule identifier
Account identifier this exclusion belongs to
Name of the exclusion rule
Description of what this rule excludes
URL path pattern to match (supports wildcards)
HTTP method to match (GET, POST, PUT, DELETE, etc.) or * for all
HTTP status code to match (nullable, null means all status codes)
Whether this exclusion rule is currently active
ISO 8601 timestamp of rule creation
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
Exclusion rule identifier
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
Bearer token for authentication
Request Body
Name of the exclusion rule
Description of what this rule excludes
URL path pattern to match. Supports wildcards (*) and exact matches
HTTP method to match (GET, POST, PUT, DELETE, etc.) or * for all methods
HTTP status code to match (optional, null means all status codes)
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
Exclusion rule identifier
Bearer token for authentication
Request Body
Name of the exclusion rule
Description of what this rule excludes
URL path pattern to match
HTTP method to match or * for all methods
HTTP status code to match (optional)
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
Exclusion rule identifier
Bearer token for authentication
Response
ID of the deleted exclusion rule
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": "*"
}