dashboard metrics
curl --request POST \
--url https://api.example.com/api/v1/project/{id}/dashboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 1,
"to": 1,
"interval": "1d",
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timezone": "-01:00"
}
'import requests
url = "https://api.example.com/api/v1/project/{id}/dashboard"
payload = {
"from": 1,
"to": 1,
"interval": "1d",
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timezone": "-01:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: 1,
to: 1,
interval: '1d',
query: 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
timezone: '-01:00'
})
};
fetch('https://api.example.com/api/v1/project/{id}/dashboard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/project/{id}/dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => 1,
'to' => 1,
'interval' => '1d',
'query' => 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
'timezone' => '-01:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/project/{id}/dashboard"
payload := strings.NewReader("{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/project/{id}/dashboard")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/project/{id}/dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"contract": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"projectId": 123,
"address": "<string>",
"implementation": "<string>",
"name": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"amlRequired": true,
"icon": "<string>",
"count": {
"SECURITY": 1,
"COMPLIANCE": 2,
"action": 3,
"trigger": 4
}
},
"total": {
"SECURITY": 1,
"COMPLIANCE": 2,
"action": 3,
"trigger": 4
},
"severity": {
"total": {
"LOW": 1,
"HIGH": 3
}
},
"histogram": [
{
"ts": 123,
"bucket": {
"SECURITY": {
"count": 2,
"maxSeverity": "CRITICAL"
},
"COMPLIANCE": {
"count": 2,
"maxSeverity": "CRITICAL"
},
"action": {
"count": 1,
"maxSeverity": "HIGH"
},
"trigger": {
"count": 1,
"maxSeverity": "LOW"
}
}
}
]
}
],
"transactions": 123
}Project Route
dashboard metrics
POST
/
api
/
v1
/
project
/
{id}
/
dashboard
dashboard metrics
curl --request POST \
--url https://api.example.com/api/v1/project/{id}/dashboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 1,
"to": 1,
"interval": "1d",
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timezone": "-01:00"
}
'import requests
url = "https://api.example.com/api/v1/project/{id}/dashboard"
payload = {
"from": 1,
"to": 1,
"interval": "1d",
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timezone": "-01:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: 1,
to: 1,
interval: '1d',
query: 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
timezone: '-01:00'
})
};
fetch('https://api.example.com/api/v1/project/{id}/dashboard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/project/{id}/dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => 1,
'to' => 1,
'interval' => '1d',
'query' => 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
'timezone' => '-01:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/project/{id}/dashboard"
payload := strings.NewReader("{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/project/{id}/dashboard")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/project/{id}/dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": 1,\n \"to\": 1,\n \"interval\": \"1d\",\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timezone\": \"-01:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"contract": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"projectId": 123,
"address": "<string>",
"implementation": "<string>",
"name": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"amlRequired": true,
"icon": "<string>",
"count": {
"SECURITY": 1,
"COMPLIANCE": 2,
"action": 3,
"trigger": 4
}
},
"total": {
"SECURITY": 1,
"COMPLIANCE": 2,
"action": 3,
"trigger": 4
},
"severity": {
"total": {
"LOW": 1,
"HIGH": 3
}
},
"histogram": [
{
"ts": 123,
"bucket": {
"SECURITY": {
"count": 2,
"maxSeverity": "CRITICAL"
},
"COMPLIANCE": {
"count": 2,
"maxSeverity": "CRITICAL"
},
"action": {
"count": 1,
"maxSeverity": "HIGH"
},
"trigger": {
"count": 1,
"maxSeverity": "LOW"
}
}
}
]
}
],
"transactions": 123
}Authorizations
Authentication
Path Parameters
Body
application/json
From milliseconds timestamp for histogram calculation
Required range:
x >= 0To milliseconds timestamp for histogram calculation
Required range:
x >= 0Interval for histogram buckets calculation. Example: 1h, 3h, 1d, 1M
Example:
"1d"
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 for histogram buckets calculation. Default: UTC
Example:
"-01:00"
⌘I