One HTTP API for all your MikroTik routers. PPPoE, Hotspot, Queues, Firewall, System, IP, VPN and more — over a simple JSON API.
If you manage MikroTik routers, you already know the pain of clicking through Winbox or writing RouterOS scripts for every small task.
This tool is a ready-to-run HTTP API that talks to your routers for you. Instead of implementing the RouterOS protocol yourself, your app, script or dashboard just sends a simple HTTP request — and gets back clean JSON.
Your app / script / dashboard
│ HTTP + JSON (easy)
▼
┌──────────────────┐ RouterOS API ┌──────────────┐
│ MikroTik API │ ───────────────────────▶ │ Routers │
│ (this binary) │ │ (10.100.x.x)│
└──────────────────┘ └──────────────┘
No database. No browser. No vendor lock-in. One small binary is all you run.
- 248 ready-made tasks across 20 feature areas — system, PPPoE, hotspot, queues, firewall, DHCP, IP, DNS/NTP, VPN, bridges, wireless, RADIUS and more.
- One consistent format — every task uses the same request/response JSON shape, so it's easy to learn once and reuse everywhere.
- Discoverable —
GET /v1/methodslists every available task and its parameters, so you never have to guess. - Stateless — every request carries its own router address and credentials. Nothing is stored, no sessions to manage, nothing to leak.
- Config export & diff — pull a router's full configuration and compare versions of it.
- Clear error messages — wrong password, unreachable router, bad request… each failure has its own status code and a plain-English reason.
Pick your server — a small VPS, a home server, or a box inside your office — and download the Linux binary for your architecture from the Releases page.
# x86-64 (most common)
curl -LO https://github.com/tunguard/tunguard-plugin/releases/latest/download/mikrotik-cp-linux-amd64
# or ARM64 (e.g. Raspberry Pi, ARM cloud servers)
curl -LO https://github.com/tunguard/tunguard-plugin/releases/latest/download/mikrotik-cp-linux-arm64Make it executable and run it:
chmod +x mikrotik-cp-linux-amd64
sudo mv mikrotik-cp-linux-amd64 /usr/local/bin/mikrotik-cp
mikrotik-cpThat's it — the API is now live on your server. By default it listens on port 8080, so the base URL is:
http://YOUR-SERVER-IP:8080
Not sure which architecture? Run
uname -mon your server.x86_64→linux-amd64,aarch64→linux-arm64.
Create a systemd service so it starts automatically and restarts on failure:
sudo tee /etc/systemd/system/mikrotik-cp.service > /dev/null <<'EOF'
[Unit]
Description=MikroTik Control Plane API
After=network.target
[Service]
ExecStart=/usr/local/bin/mikrotik-cp
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now mikrotik-cp
sudo systemctl status mikrotik-cpPrefer to build it yourself? See CONTRIBUTING.md → Development Setup.
The first thing to do is check that it's alive:
curl http://YOUR-SERVER-IP:8080/v1/health{"status":"ok","version":"1.0.0","methods":248,"time":"2026-08-02T10:00:00Z"}Now pick a task from the catalog and call it. Every task is a POST to
/v1/rpc with three parts:
| Part | What it is |
|---|---|
method |
Which task to run, e.g. pppoe.secrets.list |
router |
Which router to talk to, and with which credentials |
params |
The task-specific options (see /v1/methods) |
curl http://YOUR-SERVER-IP:8080/v1/rpc \
-H "Content-Type: application/json" \
-d '{
"method": "system.info",
"router": {
"router_ip": "10.100.0.5",
"username": "admin",
"password": "s3cret"
}
}'{
"success": true,
"method": "system.info",
"router": "10.100.0.5:8728",
"data": {
"identity": "Office-Router",
"version": "7.14.2",
"uptime": "32d10h22m",
"cpu-load": "3",
"board-name": "CCR1036-8G-2S+"
},
"elapsed_ms": 14
}curl http://YOUR-SERVER-IP:8080/v1/rpc \
-H "Content-Type: application/json" \
-d '{
"method": "pppoe.secrets.list",
"router": { "router_ip": "10.100.0.5", "username": "admin", "password": "s3cret" }
}'curl http://YOUR-SERVER-IP:8080/v1/rpc \
-H "Content-Type: application/json" \
-d '{
"method": "pppoe.secrets.add",
"router": { "router_ip": "10.100.0.5", "username": "admin", "password": "s3cret" },
"params": { "name": "ali-home", "password": "clientpw", "profile": "1M", "rate_limit": "10M/10M" }
}'curl http://YOUR-SERVER-IP:8080/v1/rpc \
-H "Content-Type: application/json" \
-d '{
"method": "queue.simple.set",
"router": { "router_ip": "10.100.0.5", "username": "admin", "password": "s3cret" },
"params": { "name": "ali-home", "max_limit": "10M/10M" }
}'To keep things safe, the API will only talk to routers inside the network you
define with CP_VPN_SUBNET (default 10.100.0.0/24).
- Router IP inside the subnet → allowed.
- Router IP outside the subnet → rejected with
403 router_ip_forbidden.
If your routers live on a different network, just tell it:
CP_VPN_SUBNET=192.168.88.0/24 mikrotik-cpOr in the systemd service, add Environment=CP_VPN_SUBNET=192.168.88.0/24
under [Service].
RouterOS side: the router's API port must be reachable from this server — port 8728 (plain) or 8729 (SSL). You can restrict which IPs may use the API from RouterOS:
IP → Services → api → Available From.
Runs one task against one router.
Request body
{
"method": "pppoe.secrets.list",
"router": {
"router_ip": "10.100.0.5",
"port": 8728,
"username": "admin",
"password": "s3cret",
"tls": false,
"timeout": 10
},
"params": {
"name": "ali-home"
}
}| Field | Description |
|---|---|
method |
Task name, e.g. pppoe.secrets.list. See /v1/methods for all of them. |
router.router_ip |
The router to contact. Must be inside CP_VPN_SUBNET. peer_ip and host also work. |
router.port |
RouterOS API port (default 8728) |
router.username / router.password |
The router's API login |
router.tls |
true to use the secure API-SSL port (8729) |
router.tls_insecure |
true only if the router uses a self-signed certificate |
router.timeout |
How long to wait before giving up, in seconds (default 10) |
params |
The task's parameters. Get the exact list for any task from /v1/methods. |
Success response
{
"success": true,
"method": "pppoe.secrets.list",
"router": "10.100.0.5:8728",
"data": [
{ ".id": "*1", "name": "ali-home", "service": "pppoe", "profile": "1M", "disabled": "false" }
],
"elapsed_ms": 14
}Error response
{
"success": false,
"method": "pppoe.secrets.list",
"router": "10.100.0.5:8728",
"error": { "code": "routeros_error", "message": "no such command prefix" },
"elapsed_ms": 12
}What the error codes mean
| HTTP | error.code |
Meaning |
|---|---|---|
| 400 | invalid_request |
The JSON body was malformed |
| 400 | invalid_params |
A required field is missing or wrong |
| 401 | authentication_failed |
Wrong router username/password |
| 403 | router_ip_forbidden |
The router IP is outside your allowed subnet |
| 404 | method_not_found |
Unknown task name |
| 404 | not_found |
The item you asked for doesn't exist on the router |
| 408 | timeout |
The router took too long to reply |
| 500 | internal_error |
Unexpected server error |
| 502 | connection_failed |
Couldn't reach the router |
| 502 | routeros_error |
The router rejected the command |
Returns the full catalog of tasks, their groups and their parameters. This is the best way to explore what the API can do:
# all PPPoE tasks
curl http://YOUR-SERVER-IP:8080/v1/methods \
| jq '.methods[] | select(.group=="pppoe") | .name'# see what params a task accepts
curl http://YOUR-SERVER-IP:8080/v1/methods | jq '.methods[] | select(.name=="pppoe.secrets.add")'Returns status, version and how many tasks are available.
A copy-paste example for all 248 tasks, grouped by feature area. Just swap
YOUR-SERVER-IP and the router credentials for your own. Tasks that target a
specific item (.set, .remove, .disable, …) accept an optional
.id parameter — see /v1/methods for the full parameter list of any task.
Jump to a feature area: [bridge](#bridge), [dhcp](#dhcp), [diagnostics](#diagnostics), [dns](#dns), [export](#export), [firewall](#firewall), [hotspot](#hotspot), [interface](#interface), [ip](#ip), [monitor](#monitor), [ntp](#ntp), [pppoe](#pppoe), [queue](#queue), [radius](#radius), [raw](#raw), [router_users](#router_users), [script](#script), [syslog](#syslog), [system](#system), [vpn](#vpn), [wireless](#wireless)
# bridge.add — Create a bridge interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# bridge.host.list — Bridge MAC table (learned hosts)
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.host.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.list — List bridge interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.port.add — Add an interface to a bridge
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.port.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"interface":"ether1","bridge":"bridge1"}}'# bridge.port.list — List bridge ports
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.port.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.port.remove — Remove a bridge port
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.port.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.remove — Remove a bridge interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.set — Update a bridge interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.vlan.add — Create a bridge VLAN
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.vlan.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"bridge":"bridge1","vlan_ids":"100"}}'# bridge.vlan.list — List bridge VLANs
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.vlan.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# bridge.vlan.remove — Remove a bridge VLAN
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"bridge.vlan.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.client.list — List DHCP clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.client.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.add — Create a static DHCP lease
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.50","mac_address":"00:0C:42:00:00:01"}}'# dhcp.leases.disable — Disable a DHCP lease
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.enable — Enable a DHCP lease
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.list — List DHCP server leases
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.make_static — Convert a dynamic lease into a static one
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.make_static","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.remove — Remove a DHCP lease
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.leases.set — Update a DHCP lease
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.leases.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.50","mac_address":"00:0C:42:00:00:01"}}'# dhcp.network.add — Create a DHCP network
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.network.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.0/24"}}'# dhcp.network.list — List DHCP networks
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.network.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.network.remove — Remove a DHCP network
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.network.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.relay.list — List DHCP relays
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.relay.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.server.add — Create a DHCP server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.server.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","interface":"ether1"}}'# dhcp.server.list — List DHCP servers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.server.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dhcp.server.remove — Remove a DHCP server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dhcp.server.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# diagnostics.check — Run a full diagnostic sweep (health, latency, traffic)
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"diagnostics.check","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# diagnostics.connection_info — Active PPPoE and Hotspot connections
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"diagnostics.connection_info","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# diagnostics.health — Combined CPU, memory and disk health
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"diagnostics.health","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# diagnostics.latency — Measure latency to your tracked clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"diagnostics.latency","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dns.settings.get — Get DNS settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dns.settings.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dns.settings.set — Update DNS settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dns.settings.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dns.static.add — Create a static DNS record
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dns.static.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"router.local","address":"192.168.88.5"}}'# dns.static.list — List static DNS records
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dns.static.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# dns.static.remove — Remove a static DNS record
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"dns.static.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# export.diff — Diff two exported configurations
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"export.diff","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"config":"full"}}'# export.full — Export the full router configuration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"export.full","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# export.section — Export the configuration section matching a path
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"export.section","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"path":"/ip address"}}'# firewall.address_list.find — Find an address in an address list
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.address_list.find","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"list":"blocked","address":"192.168.88.1"}}'# firewall.address_lists.add — Add an address to an address list
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.address_lists.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"list":"blocked","address":"192.168.88.1"}}'# firewall.address_lists.list — List firewall address lists
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.address_lists.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.address_lists.remove — Remove an address list entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.address_lists.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.connection_tracking — Firewall connection tracking summary
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.connection_tracking","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.connections.list — List active firewall connections
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.connections.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.connections.remove — Remove active connections
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.connections.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.mangle.add — Add a mangle rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.mangle.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.mangle.list — List mangle rules
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.mangle.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.mangle.remove — Remove a mangle rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.mangle.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.nat.add — Add a NAT rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.nat.disable — Disable a NAT rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.nat.enable — Enable a NAT rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.nat.list — List NAT rules
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.nat.remove — Remove a NAT rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.nat.set — Update a NAT rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.nat.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.raw.add — Add a raw rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.raw.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.raw.list — List raw rules
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.raw.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.raw.remove — Remove a raw rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.raw.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.add — Add a filter rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.rules.disable — Disable a filter rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.enable — Enable a filter rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.list — List filter rules
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.remove — Remove a filter rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.reset_counters — Reset filter rule byte/packet counters
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.reset_counters","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.rules.set — Update a filter rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.rules.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"chain":"forward"}}'# firewall.service_ports.list — List firewall service ports
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.service_ports.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# firewall.total — Total byte/packet counts across filter, NAT, mangle and raw
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"firewall.total","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.active.disconnect — Disconnect an active hotspot client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.active.disconnect","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.cookies.list — List hotspot cookies
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.cookies.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.cookies.remove_all — Remove all hotspot cookies
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.cookies.remove_all","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.hosts.active — Active hotspot hosts (connected devices)
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.hosts.active","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.hosts.remove — Remove a hotspot host entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.hosts.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.ip_bindings.add — Bind a MAC to an IP in the hotspot
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.ip_bindings.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"mac_address":"00:0C:42:00:00:01"}}'# hotspot.ip_bindings.list — List hotspot IP bindings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.ip_bindings.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.ip_bindings.remove — Remove a hotspot IP binding
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.ip_bindings.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.reset — Reset hotspot users and their counters
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.reset","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.server.list — List hotspot servers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.server.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.server_profiles.add — Create a hotspot server profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.server_profiles.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"default"}}'# hotspot.server_profiles.list — List hotspot server profiles
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.server_profiles.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.server_profiles.remove — Remove a hotspot server profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.server_profiles.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.user_profiles.add — Create a hotspot user profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.user_profiles.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"guest-profile"}}'# hotspot.user_profiles.list — List hotspot user profiles
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.user_profiles.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.user_profiles.remove — Remove a hotspot user profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.user_profiles.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.active — Active hotspot users (logged-in sessions)
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.active","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.add — Create a hotspot user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"guest-0421"}}'# hotspot.users.disable — Disable a hotspot user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.enable — Enable a hotspot user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.list — List hotspot users
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.remove — Remove a hotspot user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.remove_all — Remove all hotspot users
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.remove_all","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# hotspot.users.set — Update a hotspot user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.users.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"guest-0421"}}'# hotspot.vouchers.generate — Generate hotspot vouchers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"hotspot.vouchers.generate","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.bonding.list — List bonding interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.bonding.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.bridge.list — List bridge interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.bridge.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.disable — Disable an interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.enable — Enable an interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.ethernet.list — List ethernet interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.ethernet.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.get — Get a single interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.list — List all interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.monitor — Monitor an interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.monitor","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"interface":"ether1"}}'# interface.monitor_traffic — Monitor traffic on an interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.monitor_traffic","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"interface":"ether1"}}'# interface.vlan.add — Create a VLAN interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.vlan.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","vlan_id":"100","interface":"ether1"}}'# interface.vlan.list — List VLAN interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.vlan.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# interface.vlan.remove — Remove a VLAN interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"interface.vlan.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.address.add — Add an IP address to an interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.1/24","interface":"ether1"}}'# ip.address.disable — Disable an IP address
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.address.enable — Enable an IP address
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.address.list — List IP addresses
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.address.remove — Remove an IP address
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.address.set — Update an IP address
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.address.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.1/24","interface":"ether1"}}'# ip.arp.add — Add a static ARP entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.arp.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.1","mac_address":"00:0C:42:00:00:01","interface":"ether1"}}'# ip.arp.list — List ARP entries
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.arp.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.arp.remove — Remove an ARP entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.arp.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.cloud.get — Get DDNS cloud address and DNS name
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.cloud.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.pool.add — Create an IP pool
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.pool.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","ranges":"192.168.100.10-192.168.100.50"}}'# ip.pool.list — List IP pools
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.pool.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.pool.remove — Remove an IP pool
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.pool.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.route.add — Add a static route
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.route.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"dst_address":"0.0.0.0/0","gateway":"192.168.88.1"}}'# ip.route.list — List routes
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.route.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.route.remove — Remove a route
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.route.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ip.service.list — List available IP services
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ip.service.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# session_monitor.list — List tracked client sessions
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"session_monitor.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# session_monitor.online_count — Count online clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"session_monitor.online_count","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# session_monitor.usage — Get data usage for a client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"session_monitor.usage","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# usage_tracker.list — List tracked clients and their usage
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"usage_tracker.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ntp.client.get — Get NTP client settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ntp.client.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ntp.client.set — Update NTP client settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ntp.client.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ntp.server.get — Get NTP server settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ntp.server.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# ntp.server.set — Update NTP server settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"ntp.server.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.interface.add — Create a PPPoE interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.interface.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"pppoe-out1","interface":"ether1","user":"admin"}}'# pppoe.interface.list — List PPPoE interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.interface.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.interface.remove — Remove a PPPoE interface
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.interface.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.profiles.add — Create a PPPoE profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.profiles.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# pppoe.profiles.list — List PPPoE profiles
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.profiles.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.profiles.remove — Remove a PPPoE profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.profiles.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.profiles.set — Update a PPPoE profile
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.profiles.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# pppoe.secrets.add — Create a PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"ali-home"}}'# pppoe.secrets.bulk_add — Bulk-create PPPoE secrets
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.bulk_add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"secrets":"[{\"name\":\"user1\",\"password\":\"pw1\"},{\"name\":\"user2\",\"password\":\"pw2\"}]"}}'# pppoe.secrets.disable — Disable a PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.secrets.enable — Enable a PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.secrets.get — Get a single PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.secrets.list — List PPPoE secrets
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.secrets.remove — Remove a PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.secrets.set — Update a PPPoE secret
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.secrets.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"ali-home"}}'# pppoe.sessions.active — Active PPPoE sessions
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.sessions.active","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.sessions.disconnect — Disconnect a PPPoE session
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.sessions.disconnect","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# pppoe.total — Total PPPoE traffic and session counts
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"pppoe.total","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.simple.add — Create a simple queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","target":"192.168.88.0/24"}}'# queue.simple.bulk_set_limit — Set bandwidth limits for multiple queues
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.bulk_set_limit","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"queues":"[{\"name\":\"q1\",\"max_limit\":\"10M/10M\"},{\"name\":\"q2\",\"max_limit\":\"5M/5M\"}]"}}'# queue.simple.list — List simple queues
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.simple.remove — Remove a simple queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.simple.set — Update a simple queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","target":"192.168.88.0/24"}}'# queue.simple.set_limit — Set bandwidth limit on a simple queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.simple.set_limit","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.total — Total queue byte/packet counts
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.total","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.tree.add — Create a tree queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.tree.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# queue.tree.list — List tree queues
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.tree.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.tree.remove — Remove a tree queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.tree.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# queue.tree.set — Update a tree queue
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.tree.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# queue.type.list — List queue types
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"queue.type.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.add — Add a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.10","secret":"radiussecret"}}'# radius.disable — Disable a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.enable — Enable a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.incoming.add — Add an incoming RADIUS configuration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.incoming.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.10","secret":"radiussecret"}}'# radius.incoming.list — List incoming RADIUS configurations
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.incoming.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.incoming.remove — Remove an incoming RADIUS configuration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.incoming.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.list — List RADIUS servers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.remove — Remove a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.set — Update a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# radius.test — Test authentication against a RADIUS server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"radius.test","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.10","username":"admin","password":"secret123"}}'# raw.command — Run a raw RouterOS command
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"raw.command","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"command":"/system/resource/print"}}'# raw.print — Print a raw RouterOS path
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"raw.print","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"path":"/system"}}'# router.user.active — List active router users
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.active","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.add — Create a router user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","group":"full"}}'# router.user.disable — Disable a router user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.disable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.enable — Enable a router user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.enable","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.groups.add — Create a router user group
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.groups.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo"}}'# router.user.groups.list — List router user groups
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.groups.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.groups.remove — Remove a router user group
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.groups.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.list — List router users
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.remove — Remove a router user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# router.user.set — Update a router user
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"router.user.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","group":"full"}}'# script.add — Create a router script
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"backup","source":":log info \"backup done\""}}'# script.list — List router scripts
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# script.remove — Remove a router script
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# script.run — Run a router script
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.run","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# script.run_source — Run an inline RouterOS script
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.run_source","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"source":":log info \"hello from api\""}}'# script.set — Update a router script
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"script.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.action.add — Create a syslog action
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.action.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","target":"192.168.88.10"}}'# syslog.action.list — List syslog actions
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.action.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.action.remove — Remove a syslog action
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.action.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.remote.add — Add a remote syslog server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.remote.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"address":"192.168.88.10"}}'# syslog.remote.list — List remote syslog servers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.remote.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.remote.remove — Remove a remote syslog server
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.remote.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.rule.add — Create a syslog rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.rule.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"topics":"error,warning"}}'# syslog.rule.list — List syslog rules
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.rule.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.rule.remove — Remove a syslog rule
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.rule.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# syslog.settings — Get syslog settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"syslog.settings","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.clock.get — Get system clock settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.clock.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.clock.set — Update system clock settings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.clock.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.cpu_load — Current CPU load
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.cpu_load","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.health — Voltage, temperature, fan and power readings
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.health","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.health.monitor — Monitor system health over time
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.health.monitor","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.history — RouterOS undo history
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.history","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.identity.get — Get router identity
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.identity.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.identity.set — Set router identity
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.identity.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"office-router"}}'# system.info — Combined router identity + resource information
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.info","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.license — RouterOS license information
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.license","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.logs — Read system logs
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.logs","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.logs.clear — Clear system logs
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.logs.clear","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.notes.get — Get router notes
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.notes.get","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.notes.set — Set router notes
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.notes.set","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"note":"hello"}}'# system.ping — Ping a host from the router
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.ping","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"host":"192.168.88.1"}}'# system.reboot — Reboot the router
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.reboot","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.resources — CPU/memory/HDD utilization and uptime
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.resources","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.scheduler.add — Create a scheduler job
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.scheduler.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"daily-check","on_event":":log info \"tick\""}}'# system.scheduler.list — List scheduler jobs
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.scheduler.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.scheduler.remove — Remove a scheduler job
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.scheduler.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.shutdown — Shut down the router
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.shutdown","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.uptime — Router uptime
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.uptime","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# system.version — RouterOS version
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"system.version","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.active.list — List active VPN connections
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.active.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.interface.list — List VPN interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.interface.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.l2tp.client.add — Create an L2TP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.l2tp.client.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","connect_to":"203.0.113.10","user":"admin","password":"secret123"}}'# vpn.l2tp.client.list — List L2TP clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.l2tp.client.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.l2tp.client.remove — Remove an L2TP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.l2tp.client.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.l2tp.server.list — List L2TP server configuration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.l2tp.server.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.ovpn.client.add — Create an OpenVPN client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.ovpn.client.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","connect_to":"203.0.113.10","user":"admin","password":"secret123"}}'# vpn.ovpn.client.list — List OpenVPN clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.ovpn.client.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.ovpn.client.remove — Remove an OpenVPN client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.ovpn.client.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.pptp.client.add — Create a PPTP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.pptp.client.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","connect_to":"203.0.113.10","user":"admin","password":"secret123"}}'# vpn.pptp.client.list — List PPTP clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.pptp.client.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.pptp.client.remove — Remove a PPTP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.pptp.client.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.pptp.server.list — List PPTP server configuration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.pptp.server.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.sstp.client.add — Create an SSTP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.sstp.client.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"name":"demo","connect_to":"203.0.113.10","user":"admin","password":"secret123"}}'# vpn.sstp.client.list — List SSTP clients
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.sstp.client.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.sstp.client.remove — Remove an SSTP client
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.sstp.client.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.wireguard.list — List WireGuard interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.wireguard.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# vpn.wireguard.peers.list — List WireGuard peers
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"vpn.wireguard.peers.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.access_list.add — Add a MAC to the wireless access list
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.access_list.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"mac_address":"00:0C:42:00:00:01"}}'# wireless.access_list.list — List wireless access list entries
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.access_list.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.access_list.remove — Remove a wireless access list entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.access_list.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.connect_list.add — Add a MAC to the connect list
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.connect_list.add","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"mac_address":"00:0C:42:00:00:01"}}'# wireless.connect_list.list — List wireless connect list entries
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.connect_list.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.connect_list.remove — Remove a wireless connect list entry
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.connect_list.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.interface.list — List wireless interfaces
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.interface.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.registration.list — List wireless registrations
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.registration.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.registration.remove — Remove a wireless registration
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.registration.remove","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'# wireless.scan — Scan for nearby wireless networks
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.scan","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"},"params":{"interface":"ether1"}}'# wireless.security_profiles.list — List wireless security profiles
curl http://YOUR-SERVER-IP:8080/v1/rpc -d '{"method":"wireless.security_profiles.list","router":{"router_ip":"10.100.0.5","username":"admin","password":"s3cret"}}'Running behind nginx gives you HTTPS, a friendly domain name, and lets other tools reach the API cleanly. If you have an SSL certificate (e.g. from Certbot/Let's Encrypt), this is all you need:
server {
listen 80;
server_name api.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}With HTTPS:
server {
listen 443 ssl;
server_name api.example.com;
ssl_certificate /etc/letsencrypt/live/api.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Reload nginx and your API is now reachable at https://api.example.com/v1/….
The API itself is intentionally unauthenticated — it's designed to run inside your trusted network. If you expose it to the internet, put it behind nginx, add HTTPS, and optionally restrict access with nginx
allow/denyrules, basic auth, or a firewall.
You can adjust the API's behavior with environment variables:
| Variable | Default | What it does |
|---|---|---|
CP_LISTEN |
:8080 |
Address/port the API listens on |
CP_LOG_LEVEL |
info |
Log detail: debug, info, warn or error |
CP_MAX_BODY_BYTES |
1048576 |
Max request body size |
CP_READ_TIMEOUT |
30s |
Read timeout |
CP_WRITE_TIMEOUT |
60s |
Write timeout |
CP_VPN_SUBNET |
10.100.0.0/24 |
Allowed router network. Empty disables the restriction. |
| Requirement | Value |
|---|---|
| Server OS | Any Linux server |
| RouterOS | 6.43+ or 7.x |
| MikroTik API | Port 8728 (plain) or 8729 (SSL) |
| Managed routers | IPs inside CP_VPN_SUBNET |
Everything else is optional. No database, no framework, no other services.
- Issues & feature requests — open an issue on GitHub.
- Contributing — code layout, building from source and testing live in CONTRIBUTING.md.
- Security policy — see SECURITY.md.
MIT