Skip to main content
PUT
/
templates
/
{templateId}
Update a Script Template
curl --request PUT \
  --url https://api.altostrat.io/templates/{templateId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Disable Guest WiFi (Scheduled)",
  "description": "A script to disable the guest WiFi interface nightly.",
  "content": "/interface wireless disable [find name=\"guest-wifi\"];",
  "metadata": {
    "department": "IT-Security",
    "reviewed": "2025-10-29"
  }
}'
{
  "id": "d9e5b5e3-3e8a-4c2f-8d2a-7e6e5a4b1c0d",
  "name": "Standard Firewall Setup",
  "description": "Applies the standard set of corporate firewall rules to a device.",
  "content": "/ip firewall filter add chain=input action=accept connection-state=established,related",
  "metadata": {
    "version": "1.2",
    "compliance": "PCI-DSS"
  },
  "author": "auth0|642b7f3b8b3b3e3e3e3e3e3e",
  "read_only": false,
  "created_at": "2025-10-29T10:30:00.000000Z",
  "updated_at": "2025-10-29T11:00:00.000000Z"
}

Authorizations

Authorization
string
header
required

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}'.

Path Parameters

templateId
string<uuid>
required

The unique identifier for the script template to update.

Example:

"d9e5b5e3-3e8a-4c2f-8d2a-7e6e5a4b1c0d"

Body

application/json
name
string
required

The updated name for the template.

Maximum length: 100
Example:

"Disable Guest WiFi (Scheduled)"

description
string
required

The updated description.

Maximum length: 200
Example:

"A script to disable the guest WiFi interface nightly."

content
string
required

The updated script content.

Maximum length: 5000
Example:

"/interface wireless disable [find name=\"guest-wifi\"];"

metadata
object

Key-value metadata.

Example:
{
"department": "IT-Security",
"reviewed": "2025-10-29"
}

Response

The script template was updated successfully.

id
string<uuid>

The unique identifier for the script template.

Example:

"d9e5b5e3-3e8a-4c2f-8d2a-7e6e5a4b1c0d"

name
string

The name of the script template.

Example:

"Standard Firewall Setup"

description
string

A brief description of what the template does.

Example:

"Applies the standard set of corporate firewall rules to a device."

content
string

The full script content of the template.

Example:

"/ip firewall filter add chain=input action=accept connection-state=established,related"

metadata
object | null

A key-value map for storing arbitrary metadata.

Example:
{ "version": "1.2", "compliance": "PCI-DSS" }
author
string<uuid> | null

The user ID of the template's author. Null for global templates.

Example:

"auth0|642b7f3b8b3b3e3e3e3e3e3e"

read_only
boolean

True if the template is global and cannot be edited by the user.

Example:

false

created_at
string<date-time>

The timestamp when the template was created.

Example:

"2025-10-29T10:30:00.000000Z"

updated_at
string<date-time>

The timestamp when the template was last updated.

Example:

"2025-10-29T11:00:00.000000Z"