curl --request POST \
--url https://app.onefirewall.com/api/v1/agents \
--header 'Content-Type: application/json' \
--data '
{
"gaid": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk",
"ts": 1753828861732,
"score_threshold": 150,
"start_from": 0,
"version": "v4.60.4",
"proxy": "CLOUD",
"sync_time": 1,
"maximum_rules": 99999998,
"api_url": "http://127.0.0.1:8081/api/v1/ipv4",
"api_url_bulk": "http://127.0.0.1:8081/api/v2/ips",
"api_url_feedback": "http://127.0.0.1:8081/api/v1/feedback",
"auth_name": "Authorization",
"api_jwt_key": "<string>",
"ids": {
"iptables": {
"active": true
},
"ebtables": {
"active": true
},
"pflist": {
"active": true
},
"modsec": {
"active": true,
"modsec_logs": "/var/log/apache2/modsec_audit.log"
},
"cloudflare": {
"active": true,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"luna": {
"active": true,
"json": [
"<unknown>"
]
},
"sshlog": {
"active": true,
"ssh_log_location": "/var/log/auth.log"
}
},
"ips": {
"httpd": {
"active": true,
"command": "cp blacklist_onefirewall.txt httpd/blacklist.txt"
},
"iptables": {
"active": true,
"acl": "/opt/onefirewall/acl/ipset.txt",
"reload_command": "sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt"
},
"checkpoint": {
"active": true,
"username": "admin",
"password": "<string>",
"address": "https://10.47.2.48",
"group": "OneFirewall_IPS",
"policy": "standard",
"domain": "Test_domain_Server",
"gateways": "Test_gw"
},
"checkpoint_securexl": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/checkpoint/install-securexl.sh",
"vsids": "1,2"
},
"fortigate": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/fortigate/install-fortigate-url-feed.sh",
"feeds": "/api/v1/feeds",
"updates": "5"
},
"csp": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/csp.sh",
"feeds": "onefirewall.txt",
"updates": "5"
},
"ebtables": {
"active": true
},
"pflist": {
"active": true,
"ofa_ips_txt": "/opt/apps/onefirewall-cloud-client/ofa-ips.txt",
"pflist_reload_command": "sudo pfctl -f /etc/pf.conf;"
},
"modsec": {
"active": true,
"ruleset": "/usr/share/modsecurity-crs/rules/onefirewall_rules.conf",
"modsec_reload_command": "sudo apachectl -k graceful;"
},
"cloudflare": {
"active": true,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"cisco": {
"active": true,
"cisco_host": "<string>",
"cisco_user": "<string>",
"cisco_password": "<string>"
},
"haproxy": {
"active": true,
"haproxy_logs": "/opt/onefirewall/acl/haproxy.txt",
"haproxy_reload_command": "sudo service haproxy reload"
},
"csv": {
"active": true,
"csv_logs": "/opt/onefirewall/feeds.csv",
"csv_reload_command": "wc /opt/onefirewall/feeds.csv"
},
"aws": {
"active": true,
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "<string>"
},
"sophos": {
"active": true,
"user": "<string>",
"password": "<string>",
"address": "<string>",
"command": "bash artifacts/sophos/update_blacklist_sophos.sh"
},
"trellix": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"fileslist_file": "<string>",
"broker_ca_bundle": "<string>",
"cert_file": "<string>",
"private_key": "<string>"
},
"infoblox": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"view": "<string>",
"domains_file": "<string>",
"domains_file_whitelist": "<string>",
"api_whitelist_url": "<string>"
},
"forcepoint": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"parent": "<string>",
"urls_file": "<string>"
}
}
}
'import requests
url = "https://app.onefirewall.com/api/v1/agents"
payload = {
"gaid": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk",
"ts": 1753828861732,
"score_threshold": 150,
"start_from": 0,
"version": "v4.60.4",
"proxy": "CLOUD",
"sync_time": 1,
"maximum_rules": 99999998,
"api_url": "http://127.0.0.1:8081/api/v1/ipv4",
"api_url_bulk": "http://127.0.0.1:8081/api/v2/ips",
"api_url_feedback": "http://127.0.0.1:8081/api/v1/feedback",
"auth_name": "Authorization",
"api_jwt_key": "<string>",
"ids": {
"iptables": { "active": True },
"ebtables": { "active": True },
"pflist": { "active": True },
"modsec": {
"active": True,
"modsec_logs": "/var/log/apache2/modsec_audit.log"
},
"cloudflare": {
"active": True,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"luna": {
"active": True,
"json": ["<unknown>"]
},
"sshlog": {
"active": True,
"ssh_log_location": "/var/log/auth.log"
}
},
"ips": {
"httpd": {
"active": True,
"command": "cp blacklist_onefirewall.txt httpd/blacklist.txt"
},
"iptables": {
"active": True,
"acl": "/opt/onefirewall/acl/ipset.txt",
"reload_command": "sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt"
},
"checkpoint": {
"active": True,
"username": "admin",
"password": "<string>",
"address": "https://10.47.2.48",
"group": "OneFirewall_IPS",
"policy": "standard",
"domain": "Test_domain_Server",
"gateways": "Test_gw"
},
"checkpoint_securexl": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/checkpoint/install-securexl.sh",
"vsids": "1,2"
},
"fortigate": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/fortigate/install-fortigate-url-feed.sh",
"feeds": "/api/v1/feeds",
"updates": "5"
},
"csp": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/csp.sh",
"feeds": "onefirewall.txt",
"updates": "5"
},
"ebtables": { "active": True },
"pflist": {
"active": True,
"ofa_ips_txt": "/opt/apps/onefirewall-cloud-client/ofa-ips.txt",
"pflist_reload_command": "sudo pfctl -f /etc/pf.conf;"
},
"modsec": {
"active": True,
"ruleset": "/usr/share/modsecurity-crs/rules/onefirewall_rules.conf",
"modsec_reload_command": "sudo apachectl -k graceful;"
},
"cloudflare": {
"active": True,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"cisco": {
"active": True,
"cisco_host": "<string>",
"cisco_user": "<string>",
"cisco_password": "<string>"
},
"haproxy": {
"active": True,
"haproxy_logs": "/opt/onefirewall/acl/haproxy.txt",
"haproxy_reload_command": "sudo service haproxy reload"
},
"csv": {
"active": True,
"csv_logs": "/opt/onefirewall/feeds.csv",
"csv_reload_command": "wc /opt/onefirewall/feeds.csv"
},
"aws": {
"active": True,
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "<string>"
},
"sophos": {
"active": True,
"user": "<string>",
"password": "<string>",
"address": "<string>",
"command": "bash artifacts/sophos/update_blacklist_sophos.sh"
},
"trellix": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"fileslist_file": "<string>",
"broker_ca_bundle": "<string>",
"cert_file": "<string>",
"private_key": "<string>"
},
"infoblox": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"view": "<string>",
"domains_file": "<string>",
"domains_file_whitelist": "<string>",
"api_whitelist_url": "<string>"
},
"forcepoint": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"parent": "<string>",
"urls_file": "<string>"
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
gaid: 'OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk',
ts: 1753828861732,
score_threshold: 150,
start_from: 0,
version: 'v4.60.4',
proxy: 'CLOUD',
sync_time: 1,
maximum_rules: 99999998,
api_url: 'http://127.0.0.1:8081/api/v1/ipv4',
api_url_bulk: 'http://127.0.0.1:8081/api/v2/ips',
api_url_feedback: 'http://127.0.0.1:8081/api/v1/feedback',
auth_name: 'Authorization',
api_jwt_key: '<string>',
ids: {
iptables: {active: true},
ebtables: {active: true},
pflist: {active: true},
modsec: {active: true, modsec_logs: '/var/log/apache2/modsec_audit.log'},
cloudflare: {
active: true,
cloudflare_x_auth_email: '<string>',
cloudflare_x_auth_key: '<string>'
},
luna: {active: true, json: ['<unknown>']},
sshlog: {active: true, ssh_log_location: '/var/log/auth.log'}
},
ips: {
httpd: {active: true, command: 'cp blacklist_onefirewall.txt httpd/blacklist.txt'},
iptables: {
active: true,
acl: '/opt/onefirewall/acl/ipset.txt',
reload_command: 'sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt'
},
checkpoint: {
active: true,
username: 'admin',
password: '<string>',
address: 'https://10.47.2.48',
group: 'OneFirewall_IPS',
policy: 'standard',
domain: 'Test_domain_Server',
gateways: 'Test_gw'
},
checkpoint_securexl: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/checkpoint/install-securexl.sh',
vsids: '1,2'
},
fortigate: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/fortigate/install-fortigate-url-feed.sh',
feeds: '/api/v1/feeds',
updates: '5'
},
csp: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/csp.sh',
feeds: 'onefirewall.txt',
updates: '5'
},
ebtables: {active: true},
pflist: {
active: true,
ofa_ips_txt: '/opt/apps/onefirewall-cloud-client/ofa-ips.txt',
pflist_reload_command: 'sudo pfctl -f /etc/pf.conf;'
},
modsec: {
active: true,
ruleset: '/usr/share/modsecurity-crs/rules/onefirewall_rules.conf',
modsec_reload_command: 'sudo apachectl -k graceful;'
},
cloudflare: {
active: true,
cloudflare_x_auth_email: '<string>',
cloudflare_x_auth_key: '<string>'
},
cisco: {
active: true,
cisco_host: '<string>',
cisco_user: '<string>',
cisco_password: '<string>'
},
haproxy: {
active: true,
haproxy_logs: '/opt/onefirewall/acl/haproxy.txt',
haproxy_reload_command: 'sudo service haproxy reload'
},
csv: {
active: true,
csv_logs: '/opt/onefirewall/feeds.csv',
csv_reload_command: 'wc /opt/onefirewall/feeds.csv'
},
aws: {
active: true,
accessKeyId: '<string>',
secretAccessKey: '<string>',
region: '<string>'
},
sophos: {
active: true,
user: '<string>',
password: '<string>',
address: '<string>',
command: 'bash artifacts/sophos/update_blacklist_sophos.sh'
},
trellix: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
fileslist_file: '<string>',
broker_ca_bundle: '<string>',
cert_file: '<string>',
private_key: '<string>'
},
infoblox: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
group: '<string>',
policy: '<string>',
action: '<string>',
view: '<string>',
domains_file: '<string>',
domains_file_whitelist: '<string>',
api_whitelist_url: '<string>'
},
forcepoint: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
group: '<string>',
policy: '<string>',
action: '<string>',
parent: '<string>',
urls_file: '<string>'
}
}
})
};
fetch('https://app.onefirewall.com/api/v1/agents', 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://app.onefirewall.com/api/v1/agents",
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([
'gaid' => 'OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk',
'ts' => 1753828861732,
'score_threshold' => 150,
'start_from' => 0,
'version' => 'v4.60.4',
'proxy' => 'CLOUD',
'sync_time' => 1,
'maximum_rules' => 99999998,
'api_url' => 'http://127.0.0.1:8081/api/v1/ipv4',
'api_url_bulk' => 'http://127.0.0.1:8081/api/v2/ips',
'api_url_feedback' => 'http://127.0.0.1:8081/api/v1/feedback',
'auth_name' => 'Authorization',
'api_jwt_key' => '<string>',
'ids' => [
'iptables' => [
'active' => true
],
'ebtables' => [
'active' => true
],
'pflist' => [
'active' => true
],
'modsec' => [
'active' => true,
'modsec_logs' => '/var/log/apache2/modsec_audit.log'
],
'cloudflare' => [
'active' => true,
'cloudflare_x_auth_email' => '<string>',
'cloudflare_x_auth_key' => '<string>'
],
'luna' => [
'active' => true,
'json' => [
'<unknown>'
]
],
'sshlog' => [
'active' => true,
'ssh_log_location' => '/var/log/auth.log'
]
],
'ips' => [
'httpd' => [
'active' => true,
'command' => 'cp blacklist_onefirewall.txt httpd/blacklist.txt'
],
'iptables' => [
'active' => true,
'acl' => '/opt/onefirewall/acl/ipset.txt',
'reload_command' => 'sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt'
],
'checkpoint' => [
'active' => true,
'username' => 'admin',
'password' => '<string>',
'address' => 'https://10.47.2.48',
'group' => 'OneFirewall_IPS',
'policy' => 'standard',
'domain' => 'Test_domain_Server',
'gateways' => 'Test_gw'
],
'checkpoint_securexl' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/checkpoint/install-securexl.sh',
'vsids' => '1,2'
],
'fortigate' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/fortigate/install-fortigate-url-feed.sh',
'feeds' => '/api/v1/feeds',
'updates' => '5'
],
'csp' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/csp.sh',
'feeds' => 'onefirewall.txt',
'updates' => '5'
],
'ebtables' => [
'active' => true
],
'pflist' => [
'active' => true,
'ofa_ips_txt' => '/opt/apps/onefirewall-cloud-client/ofa-ips.txt',
'pflist_reload_command' => 'sudo pfctl -f /etc/pf.conf;'
],
'modsec' => [
'active' => true,
'ruleset' => '/usr/share/modsecurity-crs/rules/onefirewall_rules.conf',
'modsec_reload_command' => 'sudo apachectl -k graceful;'
],
'cloudflare' => [
'active' => true,
'cloudflare_x_auth_email' => '<string>',
'cloudflare_x_auth_key' => '<string>'
],
'cisco' => [
'active' => true,
'cisco_host' => '<string>',
'cisco_user' => '<string>',
'cisco_password' => '<string>'
],
'haproxy' => [
'active' => true,
'haproxy_logs' => '/opt/onefirewall/acl/haproxy.txt',
'haproxy_reload_command' => 'sudo service haproxy reload'
],
'csv' => [
'active' => true,
'csv_logs' => '/opt/onefirewall/feeds.csv',
'csv_reload_command' => 'wc /opt/onefirewall/feeds.csv'
],
'aws' => [
'active' => true,
'accessKeyId' => '<string>',
'secretAccessKey' => '<string>',
'region' => '<string>'
],
'sophos' => [
'active' => true,
'user' => '<string>',
'password' => '<string>',
'address' => '<string>',
'command' => 'bash artifacts/sophos/update_blacklist_sophos.sh'
],
'trellix' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'fileslist_file' => '<string>',
'broker_ca_bundle' => '<string>',
'cert_file' => '<string>',
'private_key' => '<string>'
],
'infoblox' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'group' => '<string>',
'policy' => '<string>',
'action' => '<string>',
'view' => '<string>',
'domains_file' => '<string>',
'domains_file_whitelist' => '<string>',
'api_whitelist_url' => '<string>'
],
'forcepoint' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'group' => '<string>',
'policy' => '<string>',
'action' => '<string>',
'parent' => '<string>',
'urls_file' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://app.onefirewall.com/api/v1/agents"
payload := strings.NewReader("{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.onefirewall.com/api/v1/agents")
.header("Content-Type", "application/json")
.body("{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onefirewall.com/api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "WCF Agent created successfully",
"agent_id": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk"
}{
"error": "Invalid configuration parameters",
"details": [
"score_threshold must be between 0 and 1000",
"gaid is required"
]
}{
"error": "Invalid or missing authentication token"
}{
"error": "Internal server error occurred"
}Create WCF Agent
Creates a new WCF Agent with specified configuration for threat detection and IP blocking across multiple security platforms
curl --request POST \
--url https://app.onefirewall.com/api/v1/agents \
--header 'Content-Type: application/json' \
--data '
{
"gaid": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk",
"ts": 1753828861732,
"score_threshold": 150,
"start_from": 0,
"version": "v4.60.4",
"proxy": "CLOUD",
"sync_time": 1,
"maximum_rules": 99999998,
"api_url": "http://127.0.0.1:8081/api/v1/ipv4",
"api_url_bulk": "http://127.0.0.1:8081/api/v2/ips",
"api_url_feedback": "http://127.0.0.1:8081/api/v1/feedback",
"auth_name": "Authorization",
"api_jwt_key": "<string>",
"ids": {
"iptables": {
"active": true
},
"ebtables": {
"active": true
},
"pflist": {
"active": true
},
"modsec": {
"active": true,
"modsec_logs": "/var/log/apache2/modsec_audit.log"
},
"cloudflare": {
"active": true,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"luna": {
"active": true,
"json": [
"<unknown>"
]
},
"sshlog": {
"active": true,
"ssh_log_location": "/var/log/auth.log"
}
},
"ips": {
"httpd": {
"active": true,
"command": "cp blacklist_onefirewall.txt httpd/blacklist.txt"
},
"iptables": {
"active": true,
"acl": "/opt/onefirewall/acl/ipset.txt",
"reload_command": "sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt"
},
"checkpoint": {
"active": true,
"username": "admin",
"password": "<string>",
"address": "https://10.47.2.48",
"group": "OneFirewall_IPS",
"policy": "standard",
"domain": "Test_domain_Server",
"gateways": "Test_gw"
},
"checkpoint_securexl": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/checkpoint/install-securexl.sh",
"vsids": "1,2"
},
"fortigate": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/fortigate/install-fortigate-url-feed.sh",
"feeds": "/api/v1/feeds",
"updates": "5"
},
"csp": {
"active": true,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/csp.sh",
"feeds": "onefirewall.txt",
"updates": "5"
},
"ebtables": {
"active": true
},
"pflist": {
"active": true,
"ofa_ips_txt": "/opt/apps/onefirewall-cloud-client/ofa-ips.txt",
"pflist_reload_command": "sudo pfctl -f /etc/pf.conf;"
},
"modsec": {
"active": true,
"ruleset": "/usr/share/modsecurity-crs/rules/onefirewall_rules.conf",
"modsec_reload_command": "sudo apachectl -k graceful;"
},
"cloudflare": {
"active": true,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"cisco": {
"active": true,
"cisco_host": "<string>",
"cisco_user": "<string>",
"cisco_password": "<string>"
},
"haproxy": {
"active": true,
"haproxy_logs": "/opt/onefirewall/acl/haproxy.txt",
"haproxy_reload_command": "sudo service haproxy reload"
},
"csv": {
"active": true,
"csv_logs": "/opt/onefirewall/feeds.csv",
"csv_reload_command": "wc /opt/onefirewall/feeds.csv"
},
"aws": {
"active": true,
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "<string>"
},
"sophos": {
"active": true,
"user": "<string>",
"password": "<string>",
"address": "<string>",
"command": "bash artifacts/sophos/update_blacklist_sophos.sh"
},
"trellix": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"fileslist_file": "<string>",
"broker_ca_bundle": "<string>",
"cert_file": "<string>",
"private_key": "<string>"
},
"infoblox": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"view": "<string>",
"domains_file": "<string>",
"domains_file_whitelist": "<string>",
"api_whitelist_url": "<string>"
},
"forcepoint": {
"active": true,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"parent": "<string>",
"urls_file": "<string>"
}
}
}
'import requests
url = "https://app.onefirewall.com/api/v1/agents"
payload = {
"gaid": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk",
"ts": 1753828861732,
"score_threshold": 150,
"start_from": 0,
"version": "v4.60.4",
"proxy": "CLOUD",
"sync_time": 1,
"maximum_rules": 99999998,
"api_url": "http://127.0.0.1:8081/api/v1/ipv4",
"api_url_bulk": "http://127.0.0.1:8081/api/v2/ips",
"api_url_feedback": "http://127.0.0.1:8081/api/v1/feedback",
"auth_name": "Authorization",
"api_jwt_key": "<string>",
"ids": {
"iptables": { "active": True },
"ebtables": { "active": True },
"pflist": { "active": True },
"modsec": {
"active": True,
"modsec_logs": "/var/log/apache2/modsec_audit.log"
},
"cloudflare": {
"active": True,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"luna": {
"active": True,
"json": ["<unknown>"]
},
"sshlog": {
"active": True,
"ssh_log_location": "/var/log/auth.log"
}
},
"ips": {
"httpd": {
"active": True,
"command": "cp blacklist_onefirewall.txt httpd/blacklist.txt"
},
"iptables": {
"active": True,
"acl": "/opt/onefirewall/acl/ipset.txt",
"reload_command": "sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt"
},
"checkpoint": {
"active": True,
"username": "admin",
"password": "<string>",
"address": "https://10.47.2.48",
"group": "OneFirewall_IPS",
"policy": "standard",
"domain": "Test_domain_Server",
"gateways": "Test_gw"
},
"checkpoint_securexl": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/checkpoint/install-securexl.sh",
"vsids": "1,2"
},
"fortigate": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/fortigate/install-fortigate-url-feed.sh",
"feeds": "/api/v1/feeds",
"updates": "5"
},
"csp": {
"active": True,
"connections": "[email protected]",
"password": "admin1",
"command": "bash artifacts/csp.sh",
"feeds": "onefirewall.txt",
"updates": "5"
},
"ebtables": { "active": True },
"pflist": {
"active": True,
"ofa_ips_txt": "/opt/apps/onefirewall-cloud-client/ofa-ips.txt",
"pflist_reload_command": "sudo pfctl -f /etc/pf.conf;"
},
"modsec": {
"active": True,
"ruleset": "/usr/share/modsecurity-crs/rules/onefirewall_rules.conf",
"modsec_reload_command": "sudo apachectl -k graceful;"
},
"cloudflare": {
"active": True,
"cloudflare_x_auth_email": "<string>",
"cloudflare_x_auth_key": "<string>"
},
"cisco": {
"active": True,
"cisco_host": "<string>",
"cisco_user": "<string>",
"cisco_password": "<string>"
},
"haproxy": {
"active": True,
"haproxy_logs": "/opt/onefirewall/acl/haproxy.txt",
"haproxy_reload_command": "sudo service haproxy reload"
},
"csv": {
"active": True,
"csv_logs": "/opt/onefirewall/feeds.csv",
"csv_reload_command": "wc /opt/onefirewall/feeds.csv"
},
"aws": {
"active": True,
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "<string>"
},
"sophos": {
"active": True,
"user": "<string>",
"password": "<string>",
"address": "<string>",
"command": "bash artifacts/sophos/update_blacklist_sophos.sh"
},
"trellix": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"fileslist_file": "<string>",
"broker_ca_bundle": "<string>",
"cert_file": "<string>",
"private_key": "<string>"
},
"infoblox": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"view": "<string>",
"domains_file": "<string>",
"domains_file_whitelist": "<string>",
"api_whitelist_url": "<string>"
},
"forcepoint": {
"active": True,
"username": "<string>",
"password": "<string>",
"api": "<string>",
"group": "<string>",
"policy": "<string>",
"action": "<string>",
"parent": "<string>",
"urls_file": "<string>"
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
gaid: 'OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk',
ts: 1753828861732,
score_threshold: 150,
start_from: 0,
version: 'v4.60.4',
proxy: 'CLOUD',
sync_time: 1,
maximum_rules: 99999998,
api_url: 'http://127.0.0.1:8081/api/v1/ipv4',
api_url_bulk: 'http://127.0.0.1:8081/api/v2/ips',
api_url_feedback: 'http://127.0.0.1:8081/api/v1/feedback',
auth_name: 'Authorization',
api_jwt_key: '<string>',
ids: {
iptables: {active: true},
ebtables: {active: true},
pflist: {active: true},
modsec: {active: true, modsec_logs: '/var/log/apache2/modsec_audit.log'},
cloudflare: {
active: true,
cloudflare_x_auth_email: '<string>',
cloudflare_x_auth_key: '<string>'
},
luna: {active: true, json: ['<unknown>']},
sshlog: {active: true, ssh_log_location: '/var/log/auth.log'}
},
ips: {
httpd: {active: true, command: 'cp blacklist_onefirewall.txt httpd/blacklist.txt'},
iptables: {
active: true,
acl: '/opt/onefirewall/acl/ipset.txt',
reload_command: 'sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt'
},
checkpoint: {
active: true,
username: 'admin',
password: '<string>',
address: 'https://10.47.2.48',
group: 'OneFirewall_IPS',
policy: 'standard',
domain: 'Test_domain_Server',
gateways: 'Test_gw'
},
checkpoint_securexl: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/checkpoint/install-securexl.sh',
vsids: '1,2'
},
fortigate: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/fortigate/install-fortigate-url-feed.sh',
feeds: '/api/v1/feeds',
updates: '5'
},
csp: {
active: true,
connections: '[email protected]',
password: 'admin1',
command: 'bash artifacts/csp.sh',
feeds: 'onefirewall.txt',
updates: '5'
},
ebtables: {active: true},
pflist: {
active: true,
ofa_ips_txt: '/opt/apps/onefirewall-cloud-client/ofa-ips.txt',
pflist_reload_command: 'sudo pfctl -f /etc/pf.conf;'
},
modsec: {
active: true,
ruleset: '/usr/share/modsecurity-crs/rules/onefirewall_rules.conf',
modsec_reload_command: 'sudo apachectl -k graceful;'
},
cloudflare: {
active: true,
cloudflare_x_auth_email: '<string>',
cloudflare_x_auth_key: '<string>'
},
cisco: {
active: true,
cisco_host: '<string>',
cisco_user: '<string>',
cisco_password: '<string>'
},
haproxy: {
active: true,
haproxy_logs: '/opt/onefirewall/acl/haproxy.txt',
haproxy_reload_command: 'sudo service haproxy reload'
},
csv: {
active: true,
csv_logs: '/opt/onefirewall/feeds.csv',
csv_reload_command: 'wc /opt/onefirewall/feeds.csv'
},
aws: {
active: true,
accessKeyId: '<string>',
secretAccessKey: '<string>',
region: '<string>'
},
sophos: {
active: true,
user: '<string>',
password: '<string>',
address: '<string>',
command: 'bash artifacts/sophos/update_blacklist_sophos.sh'
},
trellix: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
fileslist_file: '<string>',
broker_ca_bundle: '<string>',
cert_file: '<string>',
private_key: '<string>'
},
infoblox: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
group: '<string>',
policy: '<string>',
action: '<string>',
view: '<string>',
domains_file: '<string>',
domains_file_whitelist: '<string>',
api_whitelist_url: '<string>'
},
forcepoint: {
active: true,
username: '<string>',
password: '<string>',
api: '<string>',
group: '<string>',
policy: '<string>',
action: '<string>',
parent: '<string>',
urls_file: '<string>'
}
}
})
};
fetch('https://app.onefirewall.com/api/v1/agents', 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://app.onefirewall.com/api/v1/agents",
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([
'gaid' => 'OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk',
'ts' => 1753828861732,
'score_threshold' => 150,
'start_from' => 0,
'version' => 'v4.60.4',
'proxy' => 'CLOUD',
'sync_time' => 1,
'maximum_rules' => 99999998,
'api_url' => 'http://127.0.0.1:8081/api/v1/ipv4',
'api_url_bulk' => 'http://127.0.0.1:8081/api/v2/ips',
'api_url_feedback' => 'http://127.0.0.1:8081/api/v1/feedback',
'auth_name' => 'Authorization',
'api_jwt_key' => '<string>',
'ids' => [
'iptables' => [
'active' => true
],
'ebtables' => [
'active' => true
],
'pflist' => [
'active' => true
],
'modsec' => [
'active' => true,
'modsec_logs' => '/var/log/apache2/modsec_audit.log'
],
'cloudflare' => [
'active' => true,
'cloudflare_x_auth_email' => '<string>',
'cloudflare_x_auth_key' => '<string>'
],
'luna' => [
'active' => true,
'json' => [
'<unknown>'
]
],
'sshlog' => [
'active' => true,
'ssh_log_location' => '/var/log/auth.log'
]
],
'ips' => [
'httpd' => [
'active' => true,
'command' => 'cp blacklist_onefirewall.txt httpd/blacklist.txt'
],
'iptables' => [
'active' => true,
'acl' => '/opt/onefirewall/acl/ipset.txt',
'reload_command' => 'sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt'
],
'checkpoint' => [
'active' => true,
'username' => 'admin',
'password' => '<string>',
'address' => 'https://10.47.2.48',
'group' => 'OneFirewall_IPS',
'policy' => 'standard',
'domain' => 'Test_domain_Server',
'gateways' => 'Test_gw'
],
'checkpoint_securexl' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/checkpoint/install-securexl.sh',
'vsids' => '1,2'
],
'fortigate' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/fortigate/install-fortigate-url-feed.sh',
'feeds' => '/api/v1/feeds',
'updates' => '5'
],
'csp' => [
'active' => true,
'connections' => '[email protected]',
'password' => 'admin1',
'command' => 'bash artifacts/csp.sh',
'feeds' => 'onefirewall.txt',
'updates' => '5'
],
'ebtables' => [
'active' => true
],
'pflist' => [
'active' => true,
'ofa_ips_txt' => '/opt/apps/onefirewall-cloud-client/ofa-ips.txt',
'pflist_reload_command' => 'sudo pfctl -f /etc/pf.conf;'
],
'modsec' => [
'active' => true,
'ruleset' => '/usr/share/modsecurity-crs/rules/onefirewall_rules.conf',
'modsec_reload_command' => 'sudo apachectl -k graceful;'
],
'cloudflare' => [
'active' => true,
'cloudflare_x_auth_email' => '<string>',
'cloudflare_x_auth_key' => '<string>'
],
'cisco' => [
'active' => true,
'cisco_host' => '<string>',
'cisco_user' => '<string>',
'cisco_password' => '<string>'
],
'haproxy' => [
'active' => true,
'haproxy_logs' => '/opt/onefirewall/acl/haproxy.txt',
'haproxy_reload_command' => 'sudo service haproxy reload'
],
'csv' => [
'active' => true,
'csv_logs' => '/opt/onefirewall/feeds.csv',
'csv_reload_command' => 'wc /opt/onefirewall/feeds.csv'
],
'aws' => [
'active' => true,
'accessKeyId' => '<string>',
'secretAccessKey' => '<string>',
'region' => '<string>'
],
'sophos' => [
'active' => true,
'user' => '<string>',
'password' => '<string>',
'address' => '<string>',
'command' => 'bash artifacts/sophos/update_blacklist_sophos.sh'
],
'trellix' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'fileslist_file' => '<string>',
'broker_ca_bundle' => '<string>',
'cert_file' => '<string>',
'private_key' => '<string>'
],
'infoblox' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'group' => '<string>',
'policy' => '<string>',
'action' => '<string>',
'view' => '<string>',
'domains_file' => '<string>',
'domains_file_whitelist' => '<string>',
'api_whitelist_url' => '<string>'
],
'forcepoint' => [
'active' => true,
'username' => '<string>',
'password' => '<string>',
'api' => '<string>',
'group' => '<string>',
'policy' => '<string>',
'action' => '<string>',
'parent' => '<string>',
'urls_file' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://app.onefirewall.com/api/v1/agents"
payload := strings.NewReader("{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.onefirewall.com/api/v1/agents")
.header("Content-Type", "application/json")
.body("{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onefirewall.com/api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"gaid\": \"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk\",\n \"ts\": 1753828861732,\n \"score_threshold\": 150,\n \"start_from\": 0,\n \"version\": \"v4.60.4\",\n \"proxy\": \"CLOUD\",\n \"sync_time\": 1,\n \"maximum_rules\": 99999998,\n \"api_url\": \"http://127.0.0.1:8081/api/v1/ipv4\",\n \"api_url_bulk\": \"http://127.0.0.1:8081/api/v2/ips\",\n \"api_url_feedback\": \"http://127.0.0.1:8081/api/v1/feedback\",\n \"auth_name\": \"Authorization\",\n \"api_jwt_key\": \"<string>\",\n \"ids\": {\n \"iptables\": {\n \"active\": true\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true\n },\n \"modsec\": {\n \"active\": true,\n \"modsec_logs\": \"/var/log/apache2/modsec_audit.log\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"luna\": {\n \"active\": true,\n \"json\": [\n \"<unknown>\"\n ]\n },\n \"sshlog\": {\n \"active\": true,\n \"ssh_log_location\": \"/var/log/auth.log\"\n }\n },\n \"ips\": {\n \"httpd\": {\n \"active\": true,\n \"command\": \"cp blacklist_onefirewall.txt httpd/blacklist.txt\"\n },\n \"iptables\": {\n \"active\": true,\n \"acl\": \"/opt/onefirewall/acl/ipset.txt\",\n \"reload_command\": \"sudo ipset flush blacklist && sudo ipset restore < /opt/onefirewall/acl/ipset.txt\"\n },\n \"checkpoint\": {\n \"active\": true,\n \"username\": \"admin\",\n \"password\": \"<string>\",\n \"address\": \"https://10.47.2.48\",\n \"group\": \"OneFirewall_IPS\",\n \"policy\": \"standard\",\n \"domain\": \"Test_domain_Server\",\n \"gateways\": \"Test_gw\"\n },\n \"checkpoint_securexl\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/checkpoint/install-securexl.sh\",\n \"vsids\": \"1,2\"\n },\n \"fortigate\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/fortigate/install-fortigate-url-feed.sh\",\n \"feeds\": \"/api/v1/feeds\",\n \"updates\": \"5\"\n },\n \"csp\": {\n \"active\": true,\n \"connections\": \"[email protected]\",\n \"password\": \"admin1\",\n \"command\": \"bash artifacts/csp.sh\",\n \"feeds\": \"onefirewall.txt\",\n \"updates\": \"5\"\n },\n \"ebtables\": {\n \"active\": true\n },\n \"pflist\": {\n \"active\": true,\n \"ofa_ips_txt\": \"/opt/apps/onefirewall-cloud-client/ofa-ips.txt\",\n \"pflist_reload_command\": \"sudo pfctl -f /etc/pf.conf;\"\n },\n \"modsec\": {\n \"active\": true,\n \"ruleset\": \"/usr/share/modsecurity-crs/rules/onefirewall_rules.conf\",\n \"modsec_reload_command\": \"sudo apachectl -k graceful;\"\n },\n \"cloudflare\": {\n \"active\": true,\n \"cloudflare_x_auth_email\": \"<string>\",\n \"cloudflare_x_auth_key\": \"<string>\"\n },\n \"cisco\": {\n \"active\": true,\n \"cisco_host\": \"<string>\",\n \"cisco_user\": \"<string>\",\n \"cisco_password\": \"<string>\"\n },\n \"haproxy\": {\n \"active\": true,\n \"haproxy_logs\": \"/opt/onefirewall/acl/haproxy.txt\",\n \"haproxy_reload_command\": \"sudo service haproxy reload\"\n },\n \"csv\": {\n \"active\": true,\n \"csv_logs\": \"/opt/onefirewall/feeds.csv\",\n \"csv_reload_command\": \"wc /opt/onefirewall/feeds.csv\"\n },\n \"aws\": {\n \"active\": true,\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"sophos\": {\n \"active\": true,\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"address\": \"<string>\",\n \"command\": \"bash artifacts/sophos/update_blacklist_sophos.sh\"\n },\n \"trellix\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"fileslist_file\": \"<string>\",\n \"broker_ca_bundle\": \"<string>\",\n \"cert_file\": \"<string>\",\n \"private_key\": \"<string>\"\n },\n \"infoblox\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"view\": \"<string>\",\n \"domains_file\": \"<string>\",\n \"domains_file_whitelist\": \"<string>\",\n \"api_whitelist_url\": \"<string>\"\n },\n \"forcepoint\": {\n \"active\": true,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"api\": \"<string>\",\n \"group\": \"<string>\",\n \"policy\": \"<string>\",\n \"action\": \"<string>\",\n \"parent\": \"<string>\",\n \"urls_file\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "WCF Agent created successfully",
"agent_id": "OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk"
}{
"error": "Invalid configuration parameters",
"details": [
"score_threshold must be between 0 and 1000",
"gaid is required"
]
}{
"error": "Invalid or missing authentication token"
}{
"error": "Internal server error occurred"
}Body
Global Agent ID - unique identifier for the agent starting with OFA-AGENT-ID- followed by a unique string of alphanumeric characters. Later on used used as agid
"OFA-AGENT-ID-6QMRfdQp3G0Skkkkkkkk"
Timestamp in milliseconds
1753828861732
Minimum threat score threshold for triggering actions
0 <= x <= 1000150
Starting index for processing
x >= 00
Agent version
"v4.60.4"
Proxy mode configuration
CLOUD, LOCAL "CLOUD"
Synchronization interval in minutes
x >= 11
Maximum number of rules to process
99999998
Primary API endpoint for IPv4 operations
"http://127.0.0.1:8081/api/v1/ipv4"
Bulk API endpoint for IP operations
"http://127.0.0.1:8081/api/v2/ips"
Feedback API endpoint
"http://127.0.0.1:8081/api/v1/feedback"
Authentication header name
"Authorization"
JWT key for API authentication
Configuration for various Intrusion Detection Systems
Show child attributes
Show child attributes
Configuration for various IP Protection Systems
Show child attributes
Show child attributes

