Saltar al contenido principal
PUT
/
policies
/
{policyId}
Actualizar una política
curl --request PUT \
  --url https://api.altostrat.io/policies/{policyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Política de Sucursal",
  "custom_input_rules": true,
  "trusted_networks": [
    "10.100.0.0/16"
  ],
  "winbox": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ssh": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "http": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "https": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "telnet": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ftp": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api_ssl": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "sites": [
    "d290f1ee-6c54-4b01-90e6-d701748f0851"
  ]
}'
{
  "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "name": "Política Corporativa Predeterminada",
  "slug": "default-corporate-policy-a1b2c3d4e5",
  "default": true,
  "custom_input_rules": true,
  "trusted_networks": [
    "10.0.0.0/8"
  ],
  "winbox": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ssh": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "http": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "https": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "telnet": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ftp": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api_ssl": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "sites": [
    "d290f1ee-6c54-4b01-90e6-d701748f0851"
  ],
  "created_at": "2025-10-29T01:00:00.000Z",
  "updated_at": "2025-10-29T02:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Introduzca su token de portador JWT.

Path Parameters

policyId
string<uuid>
required

El identificador único para la política.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

Body

application/json
name
string
required

Un nombre legible por humanos para la política.

Maximum length: 100
Example:

"Política de Sucursal"

trusted_networks
string[]
required

Una lista de redes CIDR que se consideran de confianza en todos los servicios de esta política.

Una notación CIDR IPv4 válida.

winbox
object
required
ssh
object
required
http
object
required
https
object
required
telnet
object
required
ftp
object
required
api
object
required
api_ssl
object
required
custom_input_rules
boolean
default:true

Indica si se están utilizando reglas de entrada personalizadas.

Example:

true

sites
string<uuid>[]

Un arreglo de UUIDs de Sitio para aplicar esta política durante la creación o actualización.

Example:
["d290f1ee-6c54-4b01-90e6-d701748f0851"]

Response

El objeto de la política actualizada.

id
string<uuid>

El identificador único para la política.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

name
string

Un nombre legible por humanos para la política.

Example:

"Política Corporativa Predeterminada"

slug
string

Un identificador único y amigable para URL para la política.

Example:

"default-corporate-policy-a1b2c3d4e5"

default
boolean

Indica si esta es la política predeterminada para el espacio de trabajo.

Example:

true

custom_input_rules
boolean

Indica si se están utilizando reglas de entrada personalizadas.

Example:

true

trusted_networks
string[]

Una lista de redes CIDR que se consideran de confianza en todos los servicios de esta política.

winbox
object
ssh
object
http
object
https
object
telnet
object
ftp
object
api
object
api_ssl
object
sites
string<uuid>[]

Una lista de UUIDs de Sitio a los que se aplica esta política.

Example:
["d290f1ee-6c54-4b01-90e6-d701748f0851"]
created_at
string<date-time>

La marca de tiempo de cuándo se creó la política.

Example:

"2025-10-29T01:00:00.000Z"

updated_at
string<date-time>

La marca de tiempo de la última actualización de la política.

Example:

"2025-10-29T02:30:00.000Z"