Skip to main content
POST
Get organization time to detection by asset type

Overview

Get how long threats were already live before ChainPatrol’s automation first detected them, per asset type. It covers the distinct assets your organization blocked in a date range that are still blocked today.
This endpoint is gated behind the time-to-detection-chart feature flag on a per-organization basis. If the flag is not enabled for your organization, the API returns a 403 Forbidden error. Contact ChainPatrol to enable access.

Request Body

How it is measured

The clock runs from the first time anyone saw the asset live to its earliest automated detection, for any organization. A human report does not stop the clock, including your own. byAssetType has one entry per asset type, most blocks first: The median is always a minimum: the live date is the first time anyone saw the asset, and it may have been live before that. For URLs and pages only a date the site was seen serving counts, so a domain registration date never enters the number.

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.

Body

application/json
slug
string
required

Organization slug

Minimum string length: 1
startDate
string

Only include assets blocked on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC

endDate
string

Only include assets blocked on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off

brandIds
integer[]

Only include assets belonging to these brands

Required range: x > 0
countryCodes
string[]

Only include assets scanned from these ISO 3166-1 alpha-2 countries

Required string length: 2

Response

Successful response

byAssetType
object[]
required

Time to Detection, one entry per asset type this organization blocked in the range, descending by number blocked. The clock stops at the earliest automated detection of the asset for any organization, not at this organization's report. Assets that do not enter withEvidence are left out of the median. For URL and page assets only an observed-serving date counts, so a domain registration date never enters the number