Schedule a New Script
Creates a new scheduled script entry. This involves defining the script content, selecting target devices (sites), specifying a launch time, and configuring notification recipients. The script will be in an ‘unauthorized’ state until an authorization workflow is completed.
Authorizations
Altostrat SDX API uses JWT Bearer tokens for authentication. Obtain a token via the Authentication API and include it in the Authorization header as 'Bearer {token}'.
Body
If true, create a configuration backup before executing the script.
true
If true, do not attempt to run the script on sites that are offline.
true
A human-readable name for the scheduled script.
"Nightly BGP peer maintenance"
The full content of the MikroTik RouterOS script.
"/routing bgp peer disable [find name=peer1]"
The scheduled UTC date and time for execution. Must be in the future.
"2025-12-01T04:00:00Z"
An array of site IDs to target.
[
"site_1AbCdEfGhIjKlMnOpQrStUv",
"site_2BcDeFgHiJkLmNoPqRsTuVw"
]An array of user IDs to receive notifications.
["auth0|5f9d4b3c2e1a0b006f8b4c5d"]The unique identifier of the site designated for test runs.
"site_2Al5z3gXyY5f6Z7h8j9k0l1m"
Response
The scheduled script was created successfully.
The unique identifier for the scheduled script.
"018f5bda-4690-4432-8472-358b2734f19b"
The user ID of the person who created the script schedule.
"auth0|642b7f3b8b3b3e3e3e3e3e3e"
The unique identifier of the site designated for test runs.
"site_2Al5z3gXyY5f6Z7h8j9k0l1m"
If true, a configuration backup will be created on each target device before the script is executed.
true
If true, the script execution will be aborted for a site if it is offline at launch time.
false
A human-readable name or description for the script schedule.
"Weekly firewall rule update"
An AI-generated summary of the script's purpose.
"This script adds a firewall filter rule to drop input from a specific address list named \"blacklist\"."
The full content of the MikroTik RouterOS script to be executed.
"/ip firewall filter add action=drop chain=input src-address-list=blacklist"
The current status of the scheduled script.
unauthorized, scheduled, launched, cancelled "scheduled"
The timestamp when the script execution was authorized. Null if not yet authorized.
"2025-10-30T10:00:00.000000Z"
The timestamp when the script was cancelled.
null
The scheduled UTC date and time for the script to be executed.
"2025-11-01T02:00:00.000000Z"
A human-readable countdown to the launch time.
"in 2 days"
The timestamp when the script execution actually began.
"2025-11-01T02:00:05.000000Z"
A list of site IDs where the script will be executed.
A list of user IDs to notify about the script's progress and authorization requests.
Represents the execution progress of a launched script across its target sites.
The timestamp when the scheduled script was created.
"2025-10-29T12:44:27.000000Z"
The timestamp when the scheduled script was last updated.
"2025-10-29T13:05:00.000000Z"