curl --request PUT \
--url https://api.example.com/api/v1/action/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"walletId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"tenantDestinationId": 123
}
],
"detectors": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}
'import requests
url = "https://api.example.com/api/v1/action/{id}"
payload = {
"walletId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"tenantDestinationId": 123
}
],
"detectors": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletId: 123,
name: '<string>',
funcSignature: '<string>',
params: [{name: '<string>', value: '<string>'}],
gasPrice: 'market',
gasLimit: 10000000,
gasTip: '""',
description: '<string>',
destinations: [{id: 1, tenantDestinationId: 123}],
detectors: [
{
id: 1,
scriptFilter: 'e.severity>=0.5',
scriptParams: {_to: 'e.getTxHash()', _value: 'a.getTimestamp()'},
detectorId: 123
}
],
triggerAlerts: [
{
id: 1,
scriptFilter: 'e.severity>=0.5',
scriptParams: {_to: 'e.getTxHash()', _value: 'a.getTimestamp()'},
triggerAlertId: 123
}
]
})
};
fetch('https://api.example.com/api/v1/action/{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/action/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'walletId' => 123,
'name' => '<string>',
'funcSignature' => '<string>',
'params' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'gasPrice' => 'market',
'gasLimit' => 10000000,
'gasTip' => '""',
'description' => '<string>',
'destinations' => [
[
'id' => 1,
'tenantDestinationId' => 123
]
],
'detectors' => [
[
'id' => 1,
'scriptFilter' => 'e.severity>=0.5',
'scriptParams' => [
'_to' => 'e.getTxHash()',
'_value' => 'a.getTimestamp()'
],
'detectorId' => 123
]
],
'triggerAlerts' => [
[
'id' => 1,
'scriptFilter' => 'e.severity>=0.5',
'scriptParams' => [
'_to' => 'e.getTxHash()',
'_value' => 'a.getTimestamp()'
],
'triggerAlertId' => 123
]
]
]),
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/action/{id}"
payload := strings.NewReader("{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/api/v1/action/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/action/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"walletId": 123,
"contractId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"funcAbi": {},
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantDestination": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"uid": "Telegram: /start {uid}",
"tags": [],
"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": {}
}
}
],
"detectors": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}update entity by id
curl --request PUT \
--url https://api.example.com/api/v1/action/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"walletId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"tenantDestinationId": 123
}
],
"detectors": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}
'import requests
url = "https://api.example.com/api/v1/action/{id}"
payload = {
"walletId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"tenantDestinationId": 123
}
],
"detectors": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletId: 123,
name: '<string>',
funcSignature: '<string>',
params: [{name: '<string>', value: '<string>'}],
gasPrice: 'market',
gasLimit: 10000000,
gasTip: '""',
description: '<string>',
destinations: [{id: 1, tenantDestinationId: 123}],
detectors: [
{
id: 1,
scriptFilter: 'e.severity>=0.5',
scriptParams: {_to: 'e.getTxHash()', _value: 'a.getTimestamp()'},
detectorId: 123
}
],
triggerAlerts: [
{
id: 1,
scriptFilter: 'e.severity>=0.5',
scriptParams: {_to: 'e.getTxHash()', _value: 'a.getTimestamp()'},
triggerAlertId: 123
}
]
})
};
fetch('https://api.example.com/api/v1/action/{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/action/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'walletId' => 123,
'name' => '<string>',
'funcSignature' => '<string>',
'params' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'gasPrice' => 'market',
'gasLimit' => 10000000,
'gasTip' => '""',
'description' => '<string>',
'destinations' => [
[
'id' => 1,
'tenantDestinationId' => 123
]
],
'detectors' => [
[
'id' => 1,
'scriptFilter' => 'e.severity>=0.5',
'scriptParams' => [
'_to' => 'e.getTxHash()',
'_value' => 'a.getTimestamp()'
],
'detectorId' => 123
]
],
'triggerAlerts' => [
[
'id' => 1,
'scriptFilter' => 'e.severity>=0.5',
'scriptParams' => [
'_to' => 'e.getTxHash()',
'_value' => 'a.getTimestamp()'
],
'triggerAlertId' => 123
]
]
]),
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/action/{id}"
payload := strings.NewReader("{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/api/v1/action/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/action/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletId\": 123,\n \"name\": \"<string>\",\n \"funcSignature\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"gasPrice\": \"market\",\n \"gasLimit\": 10000000,\n \"gasTip\": \"\\\"\\\"\",\n \"description\": \"<string>\",\n \"destinations\": [\n {\n \"id\": 1,\n \"tenantDestinationId\": 123\n }\n ],\n \"detectors\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"detectorId\": 123\n }\n ],\n \"triggerAlerts\": [\n {\n \"id\": 1,\n \"scriptFilter\": \"e.severity>=0.5\",\n \"scriptParams\": {\n \"_to\": \"e.getTxHash()\",\n \"_value\": \"a.getTimestamp()\"\n },\n \"triggerAlertId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"walletId": 123,
"contractId": 123,
"name": "<string>",
"funcSignature": "<string>",
"params": [
{
"name": "<string>",
"value": "<string>"
}
],
"funcAbi": {},
"gasPrice": "market",
"gasLimit": 10000000,
"gasTip": "\"\"",
"description": "<string>",
"destinations": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantDestination": {
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"uid": "Telegram: /start {uid}",
"tags": [],
"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": {}
}
}
],
"detectors": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"detectorId": 123
}
],
"triggerAlerts": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"scriptFilter": "e.severity>=0.5",
"scriptParams": {
"_to": "e.getTxHash()",
"_value": "a.getTimestamp()"
},
"triggerAlertId": 123
}
]
}Authorizations
Authentication
Path Parameters
Body
Status of the entity. Default: 'ACTIVE'
ACTIVE, DISABLED, DELETED Unique identifier of the wallet associated with the extractor action
Name of the action
Signature of the function from the contract abi associated with the extractor action
Input parameters of the function from the contract abi associated with the extractor action
Show child attributes
Show child attributes
Gas price for action execution. Possible values are 100%/1.0 gwei/1000000/'market'. Default: market
^(\d+(\.\d+)?|\d+(\.\d+)? gwei|\+?\-?\d+(\.\d+)?%|market)$"market"
Gas limit for action execution. Default: 10000000
10000000
Gas tip for action execution. Possible values are 100%/1.0 gwei/1000000. Default: ""
^(\d+(\.\d+)?|\d+(\.\d+)? gwei|\+?\-?\d+(\.\d+)?%)$|^$"\"\""
Description of action
List of destinations for the alert
Show child attributes
Show child attributes
List of detectors associated with the entry
Show child attributes
Show child attributes
List of trigger alerts associated with the entry
Show child attributes
Show child attributes
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 wallet associated with the extractor action
Unique identifier of the contract associated with the extractor action
Name of the action
Signature of the function from the contract abi associated with the extractor action
Input parameters of the function from the contract abi associated with the extractor action
Show child attributes
Show child attributes
Abi of the function from the contract abi associated with the extractor action
Show child attributes
Show child attributes
Gas price for action execution. Possible values are 100%/1.0 gwei/1000000/'market'. Default: market
"market"
Gas limit for action execution. Default: 10000000
10000000
Gas tip for action execution. Possible values are 100%/1.0 gwei/1000000. Default: ""
"\"\""
Description of action
List of destinations associated with the entry
Show child attributes
Show child attributes
List of detectors associated with the entry
Show child attributes
Show child attributes
List of trigger alerts associated with the entry
Show child attributes
Show child attributes