MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

IP Service → Set

AI-generated

Summary

Sets the port and address of an IP service on a MikroTik device.

Inputs

  • targetId — ID or name of the IP service to set (e.g., *1, *2, or a name like winbox). Mapped to .id in the RouterOS API command.
  • servicePort — Port number for the IP service. Defaults to 80 if omitted. Mapped to port in the API command.
  • serviceAddress — Allowed IP address or range for the IP service. Mapped to address in the API command.

Output shape

Array of result items from the RouterOS API response. Each item contains resource, operation, count, and data. If cleanKeys is true, hyphens and slashes in data keys are replaced with underscores.

Returned data reflects the result of /ip/service/set executed on the MikroTik device.

Examples

Example 1: Set the web-config service port to 8080 on the default service.

targetId: '', servicePort: 8080, serviceAddress: ''

Links

Discussion