Skip to main content

Firewall

List all firewalls

Request

Definition

GET /api/v1/settings/firewalls

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}

Query string parameters

ParameterTypeRequiredDescrizione
namestringNoIt retrieves firewalls whose name matches the entered string.

Response

Status codes

Status codeMessage
200"List of firewalls"
403"Forbidden"

Body

  • data.settings.firewalls.name string

    Firewall name.

  • data.settings.firewalls.description string

    Firewall description.

  • data.settings.firewalls.settings.enabled_as_waf boolean

    Indicates whether the firewall is enabled as a WAF (varies by type).

  • data.settings.firewalls.settings.enabled_as_fw boolean

    Indicates whether the firewall is enabled as a network firewall (varies by type).

  • data.settings.firewalls.type string

    Firewall type.

List a specific firewall

Request

Definition

GET /api/v1/settings/firewalls/{nome_firewall}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}

Response

Status codes

Status codeMessage
200"Firewall retrieved"
400"Error retrieving firewall"
403"Forbidden"

Body

{
"data": {
"firewall": {
"description": "new description",
"name": "fw_test",
"settings": {
"enabled_as_fw": true
},
"type": "generic_blacklist_feed"
}
},
"message": "Firewall retrieved",
"status": "ok"
}

Create a Oplon firewall

Request

Definition

POST /api/v1/settings/firewalls

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"firewall": {
"description": "test description oplon",
"name": "new_name",
"settings": {
"address": "10.2.3.4",
"bl_api_path": "example/of/path",
"enabled_as_fw": false,
"enabled_as_waf": false,
"password": "password",
"port": 80,
"username": "user",
"waf_api_path": "example/of/path",
"wl_api_path": "example/of/path"
},
"type": "oplon_firewall"
}
}

Response

Status codes

Status codeMessage
200"Firewall created"
400"Error creating firewall"
403"Forbidden"

Body

{
"data": {
"firewall": {
"description": "test description oplon",
"name": "new_name",
"settings": {
"address": "10.2.3.4",
"bl_api_path": "example/of/path",
"enabled_as_fw": false,
"enabled_as_waf": false,
"password": "password",
"port": 80,
"username": "user",
"waf_api_path": "example/of/path",
"wl_api_path": "example/of/path"
},
"type": "oplon_firewall"
}
},
"message": "Firewall created",
"status": "ok"
}

Update a firewall

Request

Definition

PUT /api/v1/settings/firewalls/{nome_firewall}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"attrs": {
"description": "new description"
}
}

Response

Status codes

Status codeMessage
200"Firewall updated"
400"Error updating firewall"
403"Forbidden"

Body

{
"data": {
"firewall": {
"description": "new description",
"name": "fw_test",
"settings": {
"enabled_as_fw": true
},
"type": "generic_blacklist_feed"
}
},
"message": "Firewall updated",
"status": "ok"
}

Delete a firewall

Request

Definition

DELETE /api/v1/settings/firewalls/{nome_firewall}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"attrs": {
"description": "new description"
}
}

Response

Status codes

Status codeMessage
200"Firewall deleted"
400"Error deleting firewall"
403"Forbidden"

Corpo

{
"data": {
"firewall": {
"description": "test description oplon",
"name": "new_name",
"settings": {
"address": "10.2.3.4",
"bl_api_path": "example/of/path",
"enabled_as_fw": false,
"enabled_as_waf": false,
"password": "password",
"port": 80,
"username": "user",
"waf_api_path": "example/of/path",
"wl_api_path": "example/of/path"
},
"type": "oplon_firewall"
}
},
"message": "Firewall deleted",
"status": "ok"
}