Get List of vCloud Firewall Rules

To view a list of firewall rules, use the following request:

1
2
GET /firewall_services/:firewall_service_id/firewall_rules.xml
GET /firewall_services/:firewall_service_id/firewall_rules.json

XML Request Example

1
curl -i -X GET http://onapp.test/firewall_services/4/firewall_rules.xml -u user:userpass

JSON Request Example

1
curl -i -X GET http://onapp.test/firewall_services/4/firewall_rules.json -u user:userpass

XML Output Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<vcloud_firewall_rules type="array">
  <vcloud_firewall_rule>
    <address>internal</address>
    <command>ACCEPT</command>
    <created_at type="datetime">2015-07-20T12:30:18+00:00</created_at>
    <description>VMs' internet 80</description>
    <destination_ip>external</destination_ip>
    <enable_logging type="boolean">false</enable_logging>
    <enabled type="boolean">true</enabled>
    <firewall_service_id type="integer">4</firewall_service_id>
    <id type="integer">16</id>
    <identifier>1</identifier>
    <network_interface_id nil="true"/>
    <port>80</port>
    <position type="integer">1</position>
    <protocol>TCP</protocol>
    <source_port>-1</source_port>
    <updated_at type="datetime">2015-07-20T12:30:18+00:00</updated_at>
  </vcloud_firewall_rule>
  <vcloud_firewall_rule>...</vcloud_firewall_rule>
</vcloud_firewall_rules>

Where:

address - the traffic source IP address for which this rule is active

command - the command to ACCEPT or DROP the indicated IPs

created_at - the date when the record in DB was created

description - the description of the firewall rule

destination_ip - the traffic destination IP address for which this rule is active

enable_logging - true if the system will log when the rule drops or accepts traffic

enabled - whether the firewall rule is enabled or not

firewall_service_id - the ID of the firewall service with which the rule is associated

id - the ID of the firewall rule

identifier - identifier of the firewall rule

network_interface_id - the ID of a network interface for which this rule is active

port - the traffic destination port for which this rule is active

position - the rule priority

protocol - protocol type (TCP or UDP)

source_port - the traffic source port for which this rule is active

updated_at - the date when the record was updated in DB