Skip to main content

MIKRO005 - MikroTik REST API Not Available

Agent error code #MIKRO005 indicates that the agent reached the host but did not find the RouterOS REST API at the expected path. Either the REST API is disabled, the device is running an older RouterOS version that predates REST, or the hostname is pointing at something other than a RouterOS device.

The REST API was introduced in RouterOS v7. RouterOS v6 does not have it. Integrations against v6 require the older API protocol, which Knocknoc does not currently use.

Steps to Resolve

Confirm the RouterOS Version

  1. SSH into the router and run /system resource print, or check System > Resources in WebFig
  2. The version field must be 7.x or newer
  3. If the device is on RouterOS v6, upgrade to v7 or use the EDL (Passive) Knoc type with a /ip firewall address-list import on a timer instead

Enable the www-ssl Service

  1. In RouterOS, go to IP > Services
  2. Enable www-ssl
  3. Note the port (default 443) and update the RouterOS URL field in the Knocknoc backend to match

Confirm You Are Hitting the Right Host

  1. From the agent host, run: curl -ku '<user>:<pass>' https://<router-host>/rest/system/resource
  2. The response should be JSON containing a version field
  3. If you get an HTML page, a different JSON shape, or a 404 not found, the URL is pointing at something other than RouterOS REST

Still Having Issues?

We can help you out, contact us at support@knocknoc.io.