search action alerts per contract
curl --request POST \
--url https://api.example.com/api/v1/contract/{id}/action/alert/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 0,
"size": 10,
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timeseries": [
{
"from": 1,
"to": 1
}
],
"trackTotalCount": 10000,
"sort": [
{
"field": "timestamp"
}
]
}
'import requests
url = "https://api.example.com/api/v1/contract/{id}/action/alert/search"
payload = {
"from": 0,
"size": 10,
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timeseries": [
{
"from": 1,
"to": 1
}
],
"trackTotalCount": 10000,
"sort": [{ "field": "timestamp" }]
}
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: 0,
size: 10,
query: 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
timeseries: [{from: 1, to: 1}],
trackTotalCount: 10000,
sort: [{field: 'timestamp'}]
})
};
fetch('https://api.example.com/api/v1/contract/{id}/action/alert/search', 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/contract/{id}/action/alert/search",
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' => 0,
'size' => 10,
'query' => 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
'timeseries' => [
[
'from' => 1,
'to' => 1
]
],
'trackTotalCount' => 10000,
'sort' => [
[
'field' => 'timestamp'
]
]
]),
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/contract/{id}/action/alert/search"
payload := strings.NewReader("{\n \"from\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\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/contract/{id}/action/alert/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contract/{id}/action/alert/search")
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\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"numericSeverity": 123,
"severity": "<string>",
"eid": "<string>",
"walletId": 123,
"message": "<string>",
"uid": "<string>",
"meta": {},
"tenantId": 123,
"contractId": 123,
"name": "<string>",
"actionId": 123,
"txHash": "<string>",
"projectId": 123,
"timestamp": 123,
"walletName": "Main Trading Wallet",
"walletChainUid": "ethereum",
"walletAddress": "0x742d35cc6bf4b5c6cf1c1d6c5c5c5c5c5c5c5c5c"
}
],
"total": 123
}Contract Route
search action alerts per contract
Search by params from response dto. Using contract auth
POST
/
api
/
v1
/
contract
/
{id}
/
action
/
alert
/
search
search action alerts per contract
curl --request POST \
--url https://api.example.com/api/v1/contract/{id}/action/alert/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 0,
"size": 10,
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timeseries": [
{
"from": 1,
"to": 1
}
],
"trackTotalCount": 10000,
"sort": [
{
"field": "timestamp"
}
]
}
'import requests
url = "https://api.example.com/api/v1/contract/{id}/action/alert/search"
payload = {
"from": 0,
"size": 10,
"query": "address:0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timeseries": [
{
"from": 1,
"to": 1
}
],
"trackTotalCount": 10000,
"sort": [{ "field": "timestamp" }]
}
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: 0,
size: 10,
query: 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
timeseries: [{from: 1, to: 1}],
trackTotalCount: 10000,
sort: [{field: 'timestamp'}]
})
};
fetch('https://api.example.com/api/v1/contract/{id}/action/alert/search', 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/contract/{id}/action/alert/search",
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' => 0,
'size' => 10,
'query' => 'address:0xdAC17F958D2ee523a2206206994597C13D831ec7',
'timeseries' => [
[
'from' => 1,
'to' => 1
]
],
'trackTotalCount' => 10000,
'sort' => [
[
'field' => 'timestamp'
]
]
]),
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/contract/{id}/action/alert/search"
payload := strings.NewReader("{\n \"from\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\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/contract/{id}/action/alert/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contract/{id}/action/alert/search")
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\": 0,\n \"size\": 10,\n \"query\": \"address:0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n \"timeseries\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ],\n \"trackTotalCount\": 10000,\n \"sort\": [\n {\n \"field\": \"timestamp\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"numericSeverity": 123,
"severity": "<string>",
"eid": "<string>",
"walletId": 123,
"message": "<string>",
"uid": "<string>",
"meta": {},
"tenantId": 123,
"contractId": 123,
"name": "<string>",
"actionId": 123,
"txHash": "<string>",
"projectId": 123,
"timestamp": 123,
"walletName": "Main Trading Wallet",
"walletChainUid": "ethereum",
"walletAddress": "0x742d35cc6bf4b5c6cf1c1d6c5c5c5c5c5c5c5c5c"
}
],
"total": 123
}Authorizations
Authentication
Path Parameters
Body
application/json
Starting document offset
Required range:
x >= 0Example:
0
The number of hits to return
Required range:
0 <= x <= 10000Example:
10
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"
Timestamp ranges for search indices calculation
Minimum array length:
1Show child attributes
Show child attributes
Return total results up to 'count' value. If 0, then total tracking is disabled and return total=0
Sorting for the search
Minimum array length:
1Show child attributes
Show child attributes
⌘I