curl --request GET \
--url https://api.example.com/api/v1/trigger/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/trigger/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/trigger/{id}', 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/trigger/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/trigger/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/trigger/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/trigger/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"contractId": 123,
"interceptorId": 123,
"type": "BLACKLISTED_CALLERS",
"name": "<string>",
"config": {
"blacklist": [
"0xd6dfD811E06267b25472753c4e57C0B28652bFB8"
]
},
"actions": [
"PAUSE"
],
"alerts": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"severity": "INFO",
"name": "Suspicious interaction",
"message": "This is a critical alert message",
"destinations": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"tenantDestination": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"type": "EMAIL",
"uid": "Telegram: /start {uid}",
"tags": [
"DEFAULT"
],
"value": "<string>",
"telegramBotUsername": "<string>",
"telegramUserId": "<string>",
"telegramUsername": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>",
"slackUri": "<string>",
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"uri": "<string>",
"method": "<string>",
"headers": {}
}
}
],
"actions": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"actionId": 123
}
]
}
]
}get entity by id
curl --request GET \
--url https://api.example.com/api/v1/trigger/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/trigger/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/trigger/{id}', 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/trigger/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/trigger/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/trigger/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/trigger/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"contractId": 123,
"interceptorId": 123,
"type": "BLACKLISTED_CALLERS",
"name": "<string>",
"config": {
"blacklist": [
"0xd6dfD811E06267b25472753c4e57C0B28652bFB8"
]
},
"actions": [
"PAUSE"
],
"alerts": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"severity": "INFO",
"name": "Suspicious interaction",
"message": "This is a critical alert message",
"destinations": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"tenantDestination": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"type": "EMAIL",
"uid": "Telegram: /start {uid}",
"tags": [
"DEFAULT"
],
"value": "<string>",
"telegramBotUsername": "<string>",
"telegramUserId": "<string>",
"telegramUsername": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>",
"slackUri": "<string>",
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"uri": "<string>",
"method": "<string>",
"headers": {}
}
}
],
"actions": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"status": "ACTIVE",
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"actionId": 123
}
]
}
]
}Authorizations
Authentication
Path Parameters
Response
OK
Unique identifier of the entity
1
Time when entity was created
Time when entity was updated
Status of the entity. Default: 'ACTIVE'
ACTIVE, DISABLED, DELETED Unique identifier of the contract
Unique identifier of the interceptor from haas-interceptor service
Type of the trigger
BLACKLISTED_CALLERS, WHITELIST_CALLERS, FAILED_TRANSACTIONS, FUNCTION_CALL, EVENT_EMITTED, EVENT_EMITTED_ADVANCED, ERC20_TRANSFER, TRANSACTION_PARAMS, VALUE_TRANSFER, EVENT_PARAMS, OPERATION_PARAMS Name of the trigger
Configuration details for the trigger. Examples by type:
ERC20_TRANSFER: {"token":"0xdac17f958d2ee523a2206206994597c13d831ec7","funcName":"Transfer","params":[{"name":"from","operator":"==","value":"0xd6dfD811E06267b25472753c4e57C0B28652bFB8"},{"name":"to","operator":"==","value":"0x3018018c44338b9728d02be12d632c6691e020d1"},{"name":"value","operator":">","value":"249000000"}]}
BLACKLISTED_CALLERS: {"blacklist":["0xd6dfD811E06267b25472753c4e57C0B28652bFB8","0x3018018c44338b9728d02be12d632c6691e020d1","0xd06678bc9550333b7832b7900cb7bca5cecbf787"]}
WHITELIST_CALLERS: {"whitelist":["0xd6dfD811E06267b25472753c4e57C0B28652bFB8","0x3018018c44338b9728d02be12d632c6691e020d1","0xd06678bc9550333b7832b7900cb7bca5cecbf787"]}
FAILED_TRANSACTIONS: {} or null
FUNCTION_CALL: {"funcName":"approve","params":[{"name":"_spender","operator":"==","value":"0x3018018c44338b9728d02be12d632c6691e020d1"},{"name":"_value","operator":">","value":"10"},{"name":"_value","operator":">","value":"1000"},{"name":"_value","operator":">","value":"1000000"}],"txParams":{"param":{"name":"value","operator":">","value":"100"}}}
EVENT_EMITTED: {"funcName":"Approval","params":[{"name":"owner","operator":"==","value":"0xd06678bc9550333b7832b7900cb7bca5cecbf787"},{"name":"spender","operator":"==","value":"0x3018018c44338b9728d02be12d632c6691e020d1"},{"name":"value","operator":">","value":"10"},{"name":"value","operator":">","value":"1000"},{"name":"value","operator":">","value":"1000000"}]}
TRANSACTION_PARAMS: {"operator":"AND","params":[{"operator":"OR","params":[{"param":{"name":"from_address","operator":"==","value":"or1"}},{"param":{"name":"receipt_status","operator":">","value":"1"}}]},{"param":{"name":"value","operator":"<=","value":"1000"}},{"param":{"name":"block.miner","operator":"!=","value":"qweqwe"}}]}
Show child attributes
Show child attributes
{
"blacklist": [
"0xd6dfD811E06267b25472753c4e57C0B28652bFB8"
]
}
Action that should be executed by the user for this trigger
["PAUSE"]
List of alerts associated with the entry
Show child attributes
Show child attributes