Network rules
List all network rules
Request
Definizione
GET /api/v1/settings/rules
Headers
-
AuthorizationrequiredAuthentication 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_minutesintegerRule default duration.
-
data.settings.automation.enablebooleanIf true, it indicates whether the rule is enabled.
-
data.settings.automation.update_firewallbooleanIf true, the rule will be loaded on firewall after creation.
-
data.settings.automation.whitelistarray<string>List of IP addresses authorised to access services and resources.
-
data.settings.expire_strategystringString 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
-
AuthorizationrequiredAuthentication token with privileges to view the resource.
Bearer {token} -
Content-Typerequiredapplication/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"
}