Network rules
List all network rules
Request
Definizione
GET /api/v1/settings/rules
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
Response
Status codes
Status code | Message |
---|---|
200 | "List of rules settings" |
403 | "Forbidden" |
Body
- Attributi
- Esempio
-
data.settings.automation.default_duration_minutes
integerRule default duration.
-
data.settings.automation.enable
booleanIf true, it indicates whether the rule is enabled.
-
data.settings.automation.update_firewall
booleanIf true, the rule will be loaded on firewall after creation.
-
data.settings.automation.whitelist
array<string>List of IP addresses authorised to access services and resources.
-
data.settings.expire_strategy
stringString indicating what to do with the network rule when it expires.
{
"data": {
"settings": {
"automation": {
"default_duration_minutes": 1440,
"enable": false,
"update_firewall": false,
"whitelist": []
},
"expire_strategy": "delete"
}
},
"message": "List of rules settings",
"status": "ok"
}
Update rules settings
Request
Definition
PUT /api/v1/settings/rules
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
-
Content-Type
requiredapplication/json
Request body
{
"automation": {
"default_duration_minutes": 1000,
"update_firewall": true
},
"expire_strategy": "disable"
}
Response
Status codes
Status code | Message |
---|---|
200 | "Rules settings updated" |
400 | "Error updating rules settings" |
403 | "Forbidden" |
Corpo
{
"data": {
"settings": {
"automation": {
"default_duration_minutes": 1000,
"enable": false,
"update_firewall": true,
"whitelist": []
},
"expire_strategy": "disable"
}
},
"message": "Rules settings updated",
"status": "ok"
}