# List
Get a list of firewall rules.
# HTTP Request:
GET https://api.serveravatar.com/organizations/{organization}/servers/{server}/firewall-rules
# Curl Request example:
curl --request GET \
--url "https://api.serveravatar.com/organizations/5/servers/15/firewall-rules" \
--header 'content-type: application/json' \
--header 'Authorization: <YOUR API TOKEN>'
# Response:
# Firewall Rule List
- 200 (Ok)
{
"firewallRules": [
{
"id": 891,
"server_id": 15,
"start_port": 22,
"end_port": null,
"protocol": "all",
"traffic": 1,
"ip": null,
"created_at": "2022-02-16 14:09:35",
"updated_at": "2022-02-16 14:09:35"
},
{
"id": 892,
"server_id": 15,
"start_port": 80,
"end_port": null,
"protocol": "all",
"traffic": 1,
"ip": null,
"created_at": "2022-02-16 14:09:35",
"updated_at": "2022-02-16 14:09:35"
},
{
"id": 893,
"server_id": 15,
"start_port": 443,
"end_port": null,
"protocol": "all",
"traffic": 1,
"ip": null,
"created_at": "2022-02-16 14:09:35",
"updated_at": "2022-02-16 14:09:35"
},
{
"id": 894,
"server_id": 15,
"start_port": 43210,
"end_port": null,
"protocol": "all",
"traffic": 1,
"ip": null,
"created_at": "2022-02-16 14:09:35",
"updated_at": "2022-02-16 14:09:35"
},
{
"id": 895,
"server_id": 15,
"start_port": 15,
"end_port": 125,
"protocol": "tcp",
"traffic": 0,
"ip": null,
"created_at": "2022-02-16 15:35:10",
"updated_at": "2022-02-16 15:35:10"
}
]
}
# Organization Not Found
- 404 (Not Found)
{
"message": "Organization not found!"
}
# Server Not Found
- 404 (Not Found)
{
"message": "Server not found!"
}
# Firewall Not Enable
- 500 (Internal Server Error)
{
"message": "Please enable firewall to list rules!"
}
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong!"
}