Skip to main content
POST
/
sites
/
{siteId}
/
commands
/
synchronous
Execute Synchronous Command
curl --request POST \
  --url https://api.altostrat.io/sites/{siteId}/commands/synchronous \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "command": "/interface/print",
  "parameters": [
    "=address=8.8.8.8",
    "=count=4"
  ]
}'
[
  {
    ".id": "*1",
    "name": "ether1",
    "type": "ether",
    "mac-address": "00:1A:2B:3C:4D:5E",
    "mtu": 1500,
    "running": true
  },
  {
    ".id": "*2",
    "name": "ether2",
    "type": "ether",
    "mac-address": "00:1A:2B:3C:4D:5F",
    "mtu": 1500,
    "running": false
  }
]

Authorizations

Authorization
string
header
required

A JWT issued by Altostrat's authentication service, containing user and organization claims.

Path Parameters

siteId
string
required

The unique identifier for the site (router).

Body

application/json

The RouterOS command and its parameters to execute on the target site.

command
string
required

The RouterOS API command path. This must be a read-only command.

Example:

"/interface/print"

parameters
string[]

Parameters for the RouterOS API command, formatted as an array of strings. Each string must be in the format '=key=value'.

Example:
["=address=8.8.8.8", "=count=4"]

Response

The command was executed successfully. The body contains the raw response from the RouterOS API.

The raw response from the RouterOS API, which is typically an array of objects representing the command output.