Skip to main content

Network rules

List all network rules

Request

Definizione

GET /api/v1/settings/rules

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}

Response

Status codes

Status codeMessage
200"List of rules settings"
403"Forbidden"

Body

  • data.settings.automation.default_duration_minutes integer

    Rule default duration.

  • data.settings.automation.enable boolean

    If true, it indicates whether the rule is enabled.

  • data.settings.automation.update_firewall boolean

    If 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 string

    String indicating what to do with the network rule when it expires.

Update rules settings

Request

Definition

PUT /api/v1/settings/rules

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"automation": {
"default_duration_minutes": 1000,
"update_firewall": true
},
"expire_strategy": "disable"
}

Response

Status codes

Status codeMessage
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"
}