Skip to main content
POST
/
api
/
v1
/
contract
/
{id}
/
histogram
alerts histogram for this contract
curl --request POST \
  --url https://api.example.com/api/v1/contract/{id}/histogram \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": 1,
  "to": 1,
  "interval": "1d",
  "query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
  "timezone": "-01:00"
}
'
{
  "data": [
    {
      "ts": 123,
      "bucket": {
        "SECURITY": {
          "count": 2,
          "maxSeverity": "CRITICAL"
        },
        "COMPLIANCE": {
          "count": 2,
          "maxSeverity": "CRITICAL"
        },
        "action": {
          "count": 1,
          "maxSeverity": "HIGH"
        },
        "trigger": {
          "count": 1,
          "maxSeverity": "LOW"
        }
      }
    }
  ],
  "total": {
    "SECURITY": 1,
    "COMPLIANCE": 2,
    "action": 3,
    "trigger": 4
  },
  "count": {
    "SECURITY": 1,
    "COMPLIANCE": 2,
    "action": 3,
    "trigger": 4
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.extractor.live/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authentication

Path Parameters

id
integer<int64>
required

Body

application/json
from
integer<int64>
required

From milliseconds timestamp for histogram calculation

Required range: x >= 0
to
integer<int64>
required

To milliseconds timestamp for histogram calculation

Required range: x >= 0
interval
string
required

Interval for histogram buckets calculation. Example: 1h, 3h, 1d, 1M

Example:

"1d"

query
string

Query string according to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html with Default: auto_generate_synonyms_phrase_query=false, fuzzy_max_expansions=0, fuzzy_transpositions=false

Example:

"address:0xdAC17F958D2ee523a2206206994597C13D831ec7"

timezone
string

TimeZone for histogram buckets calculation. Default: UTC

Example:

"-01:00"

Response

200 - application/json

OK

data
object[]

Response data

total
object

Total counts of different group of alerts for this contract

Example:
{
  "SECURITY": 1,
  "COMPLIANCE": 2,
  "action": 3,
  "trigger": 4
}
count
object

Count of different entries associated with the extractor contract

Example:
{
  "SECURITY": 1,
  "COMPLIANCE": 2,
  "action": 3,
  "trigger": 4
}