الانتقال إلى المحتوى الرئيسي
POST
/
policies
/
{policyId}
/
sites
تطبيق السياسة على المواقع
curl --request POST \
  --url https://api.altostrat.io/policies/{policyId}/sites \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sites": [
    "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "e9a7e93a-3c1c-4b5b-8e2e-2e6b6b3e7e3e"
  ]
}'
{
  "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "name": "سياسة الشركة الافتراضية",
  "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:00Z",
  "updated_at": "2025-10-29T02:30:00Z"
}

Authorizations

Authorization
string
header
required

أدخل رمز JWT bearer الخاص بك.

Path Parameters

policyId
string<uuid>
required

المعرف الفريد للسياسة.

Example:

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

Body

application/json
sites
string<uuid>[]
required

مصفوفة من معرفات UUID للمواقع لتطبيق هذه السياسة عليها.

Example:
[
"d290f1ee-6c54-4b01-90e6-d701748f0851",
"e9a7e93a-3c1c-4b5b-8e2e-2e6b6b3e7e3e"
]

Response

كائن السياسة المحدث الذي يعرض المواقع المرتبطة حديثًا.

id
string<uuid>

المعرف الفريد للسياسة.

Example:

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

name
string

اسم قابل للقراءة البشرية للسياسة.

Example:

"سياسة الشركة الافتراضية"

slug
string

معرف فريد وصديق لعناوين URL للسياسة.

Example:

"default-corporate-policy-a1b2c3d4e5"

default
boolean

ما إذا كانت هذه هي السياسة الافتراضية لمساحة العمل.

Example:

true

custom_input_rules
boolean

ما إذا كان يتم استخدام قواعد إدخال مخصصة.

Example:

true

trusted_networks
string[]

قائمة بشبكات CIDR التي تعتبر موثوقة عبر جميع الخدمات في هذه السياسة.

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

قائمة بمعرفات UUID للمواقع التي تطبق عليها هذه السياسة.

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

الطابع الزمني عند إنشاء السياسة.

Example:

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

updated_at
string<date-time>

الطابع الزمني لآخر تحديث للسياسة.

Example:

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