Firewall rules API


Create a firewall rule

POST /firewalls/:firewall/rules

Parameters

source
required: false
Firewall ID or CIDR range of source
port_range
required: false
Port or range for the rule
protocol
required: false
Protocol 'tcp' or 'udp'

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "firewall_rule": {
              "port_range": "0-65535",
              "protocol": "tcp"
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_firewall_rule",
              "id": "5370a8e7-a682-4126-bd71-c1ef90e30797",
              "created_at": "2018-05-29T11:00:18+00:00",
              "started_at": "2018-05-29T11:00:18+00:00",
              "finished_at": "2018-05-29T11:00:18+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (5370a8e7-a682-4126-bd71-c1ef90e30797) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-05-29T11:00:18+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/5370a8e7-a682-4126-bd71-c1ef90e30797/dependencies",
              "stages": "https://api.engineyard.com/requests/5370a8e7-a682-4126-bd71-c1ef90e30797/stages",
              "account": "https://api.engineyard.com/accounts/e4200a16-e06f-4d69-a366-f26fa18920eb",
              "requester": "https://api.engineyard.com/requests/5370a8e7-a682-4126-bd71-c1ef90e30797/requester",
              "messages": "https://api.engineyard.com/requests/5370a8e7-a682-4126-bd71-c1ef90e30797/messages",
              "callback_url": "https://api.engineyard.com/requests/5370a8e7-a682-4126-bd71-c1ef90e30797/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/201"
            }
          }
            
          








Create a firewall with another firewall as the source

POST /firewalls/:firewall/rules

Parameters

source
required: false
Firewall ID or CIDR range of source
port_range
required: false
Port or range for the rule
protocol
required: false
Protocol 'tcp' or 'udp'

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "firewall_rule": {
              "port_range": "0-65535",
              "source": 63
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_firewall_rule",
              "id": "52002b43-7ccb-4395-a8a6-69688d1c9289",
              "created_at": "2018-05-29T11:00:38+00:00",
              "started_at": "2018-05-29T11:00:38+00:00",
              "finished_at": "2018-05-29T11:00:38+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (52002b43-7ccb-4395-a8a6-69688d1c9289) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-05-29T11:00:38+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/52002b43-7ccb-4395-a8a6-69688d1c9289/dependencies",
              "stages": "https://api.engineyard.com/requests/52002b43-7ccb-4395-a8a6-69688d1c9289/stages",
              "account": "https://api.engineyard.com/accounts/ad1d2892-3cbe-4db5-8ce3-111073506f80",
              "requester": "https://api.engineyard.com/requests/52002b43-7ccb-4395-a8a6-69688d1c9289/requester",
              "messages": "https://api.engineyard.com/requests/52002b43-7ccb-4395-a8a6-69688d1c9289/messages",
              "callback_url": "https://api.engineyard.com/requests/52002b43-7ccb-4395-a8a6-69688d1c9289/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/212"
            }
          }
            
          








Delete a firewall

DELETE /firewall-rules/:firewall_rule

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_firewall_rule",
              "id": "e66462d1-db2f-4598-93c0-c52080906d23",
              "created_at": "2018-05-29T11:00:50+00:00",
              "started_at": "2018-05-29T11:00:50+00:00",
              "finished_at": "2018-05-29T11:00:50+00:00",
              "message": null,
              "request_status": "Finished: Deprovision firewall rule (e66462d1-db2f-4598-93c0-c52080906d23) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-05-29T11:00:50+00:00",
              "read_channel": null,
              "stage": "cleanup",
              "dependencies": "https://api.engineyard.com/requests/e66462d1-db2f-4598-93c0-c52080906d23/dependencies",
              "stages": "https://api.engineyard.com/requests/e66462d1-db2f-4598-93c0-c52080906d23/stages",
              "account": "https://api.engineyard.com/accounts/5b6988af-038e-462a-81ea-c7678cb6f420",
              "requester": "https://api.engineyard.com/requests/e66462d1-db2f-4598-93c0-c52080906d23/requester",
              "messages": "https://api.engineyard.com/requests/e66462d1-db2f-4598-93c0-c52080906d23/messages",
              "callback_url": "https://api.engineyard.com/requests/e66462d1-db2f-4598-93c0-c52080906d23/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/218"
            }
          }