Skip to main content
GET
Get organization metrics

Overview

Retrieve security metrics for your organization, including threat detections, blocked assets, takedowns, and more. This endpoint provides comprehensive analytics about your organization’s security posture. The organization is automatically inferred from your API key.

Quick Start

Authentication

Include your API key in the X-API-KEY header:

Example Request

Query Parameters

Response

Success Response

Response Fields

Metric Types

Organization-Level Metrics (Default)

When no brandSlug is provided, returns organization-wide metrics:
  • Aggregates all proposals, reports, and takedowns for the organization
  • Includes threats with status BLOCKED, APPROVED, and AUTO_APPROVED
  • Date filtering applies to createdAt timestamps
  • Includes all brands under the organization

Brand-Level Metrics (Optional)

When brandSlug is provided (requires brands-metrics feature flag):
  • Filters metrics to specific brand via review history
  • Queries asset status history to find brand-specific blocked threats
  • Uses status history table with brand reviews
  • Date filtering for takedowns uses updatedAt timestamps
  • Note: threatsWatchlisted always returns 0 for brand-scoped queries

Use Cases

Get All-Time Metrics

Retrieve metrics for your organization’s entire history:

Get Brand-Specific Metrics

Retrieve metrics filtered to a specific brand:

Get Monthly Metrics

Compare Time Periods

Analyze Threat Distribution

Visualize Threats Over Time

Generate Security Dashboard

Export Metrics Report

Error Responses

401 Unauthorized

Returned when the API key is missing, invalid, or doesn’t have organization access:

400 Bad Request

Returned when query parameters are invalid:

404 Not Found

Returned when brand slug is not found or doesn’t belong to your organization:

Best Practices

Date Ranges

  • Always use ISO 8601 format for dates: YYYY-MM-DDTHH:mm:ss.sssZ
  • Include timezone information (typically UTC with Z suffix)
  • Omit both dates to get all-time metrics
  • Use consistent date ranges when comparing periods

Performance

  • Cache metrics data with appropriate TTL (e.g., 1 hour for dashboards)
  • Use date filters to query specific time periods rather than filtering client-side
  • Consider scheduling periodic metric snapshots for historical tracking

Analysis

  • Compare metrics across different time periods to identify trends
  • Monitor the takedown success rate to assess enforcement effectiveness
  • Track threats by asset type to understand attack patterns

Notes

  • Organization is automatically determined from your API key
  • All timestamps are in ISO 8601 format with UTC timezone
  • If no date range is provided, all-time metrics are returned
  • Metrics are calculated in real-time based on the specified date range
  • The blockedByType array includes all asset types that have blocked threats
  • The blockedByDay array provides time series data for visualization
  • Brand filtering requires the brands-metrics feature flag
  • All queries exclude soft-deleted records
  • Date ranges are inclusive
  • For brand-filtered queries, threatsWatchlisted always returns 0
  • Date filtering for takedowns uses different timestamps for brand vs organization queries

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.

Query Parameters

brandSlug
string
startDate
string
endDate
string

Response

Successful response

metrics
object
required
blockedByType
object[]
required
blockedByDay
object[]
required