MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

Hotspot → Remove

AI-generated

Summary

Removes a specified item from the selected MikroTik Hotspot category (Servers, Users, User Profiles, Active, Hosts, IP Bindings, or Cookies) using its ID or name.

Inputs

  • hotspotCategory (required) — The Hotspot category from which to remove an item. Options: Servers, Users, User Profiles, Active, Hosts, IP Bindings, Cookies. Default: Users.
  • targetId (required) — The ID (e.g., *1) or name (e.g., user1) of the item to remove. Supports both numeric IDs and names.
  • options — Additional connection options for the MikroTik API call.
  • options.connectionAttempts — Number of times to try connecting to the MikroTik device. Default: 5.
  • options.connectionDelay — Delay (in seconds) between connection attempts. Default: 3.
  • options.cleanKeys — If true, replaces - and / with _ in the keys of the returned data. Default: false.
  • options.tag — Custom tag for the command. Default: 0.

Output shape

array of one element containing an object with resource, operation, count, and data

For a successful removal, MikroTik typically returns an empty response, so data will be an empty array and count will be 0. On error, the node wraps the error in the json field when continueOnFail() is enabled.

Examples

Example 1: Remove a Hotspot user named 'guest'

Set Resource to Hotspot, Category to Users, Operation to Remove, Target ID / Name to guest.

Example 2: Remove an active Hotspot session by its ID

Set Resource to Hotspot, Category to Active, Operation to Remove, Target ID / Name to *5.

Links

Discussion