← centrs docs

routeros/no-such-item

The RouterOS menu exists, but no item in it matches the .id, number or name the command gave, so RouterOS refused it and that command did not run. In a multi-statement script run through /execute, statements before the refused one already ran.

Emitted by

execute, api and transfer over --via rest-api and --via native-api, and execute over --via ssh and --via mac-telnet, where the console prints the same no such item text (code). RouterOS gives the same answer on each transport, so switching does not help. Validation cannot catch it: the command is well formed, and only the device knows which items exist.

Context

A command that runs through /execute, or on a console transport, succeeds at the transport level and returns the text instead (HTTP 200 over REST). Its error carries that text in detail and the via, with no httpStatus, status or path.

Typical triggers

Fix

  1. List the menu's items with centrs retrieve <router> <menu> and use an .id from that list. To match by name, filter: centrs retrieve <router> /system/script --query 'name=backup'.
  2. Do not reuse a number from an earlier print: those numbers belong to the console session that printed them. Use the .id instead.
  3. Before running a script again, check what its earlier statements changed.