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": "e9f6b4ff-7ee2-4497-a9ff-cd331f092947",
              "created_at": "2018-04-12T18:04:24+00:00",
              "started_at": "2018-04-12T18:04:24+00:00",
              "finished_at": "2018-04-12T18:04:24+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (e9f6b4ff-7ee2-4497-a9ff-cd331f092947) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:04:24+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/e9f6b4ff-7ee2-4497-a9ff-cd331f092947/dependencies",
              "stages": "https://api.engineyard.com/requests/e9f6b4ff-7ee2-4497-a9ff-cd331f092947/stages",
              "account": "https://api.engineyard.com/accounts/aa484a53-60c4-4630-8805-6c23c1880f82",
              "requester": "https://api.engineyard.com/requests/e9f6b4ff-7ee2-4497-a9ff-cd331f092947/requester",
              "messages": "https://api.engineyard.com/requests/e9f6b4ff-7ee2-4497-a9ff-cd331f092947/messages",
              "callback_url": "https://api.engineyard.com/requests/e9f6b4ff-7ee2-4497-a9ff-cd331f092947/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": "172c9d17-c98d-4aae-b2b9-8c266d6c06e5",
              "created_at": "2018-04-12T18:04:48+00:00",
              "started_at": "2018-04-12T18:04:48+00:00",
              "finished_at": "2018-04-12T18:04:48+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (172c9d17-c98d-4aae-b2b9-8c266d6c06e5) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:04:48+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/172c9d17-c98d-4aae-b2b9-8c266d6c06e5/dependencies",
              "stages": "https://api.engineyard.com/requests/172c9d17-c98d-4aae-b2b9-8c266d6c06e5/stages",
              "account": "https://api.engineyard.com/accounts/62835ffd-a7ff-4d98-9f9d-16504ebef50f",
              "requester": "https://api.engineyard.com/requests/172c9d17-c98d-4aae-b2b9-8c266d6c06e5/requester",
              "messages": "https://api.engineyard.com/requests/172c9d17-c98d-4aae-b2b9-8c266d6c06e5/messages",
              "callback_url": "https://api.engineyard.com/requests/172c9d17-c98d-4aae-b2b9-8c266d6c06e5/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": "c81dceb6-7b80-425b-91dd-a86abe42b7fd",
              "created_at": "2018-04-12T18:05:01+00:00",
              "started_at": "2018-04-12T18:05:01+00:00",
              "finished_at": "2018-04-12T18:05:02+00:00",
              "message": null,
              "request_status": "Finished: Deprovision firewall rule (c81dceb6-7b80-425b-91dd-a86abe42b7fd) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:05:02+00:00",
              "read_channel": null,
              "stage": "cleanup",
              "dependencies": "https://api.engineyard.com/requests/c81dceb6-7b80-425b-91dd-a86abe42b7fd/dependencies",
              "stages": "https://api.engineyard.com/requests/c81dceb6-7b80-425b-91dd-a86abe42b7fd/stages",
              "account": "https://api.engineyard.com/accounts/27aa1cf4-e13c-4c73-8651-fb820165b6c1",
              "requester": "https://api.engineyard.com/requests/c81dceb6-7b80-425b-91dd-a86abe42b7fd/requester",
              "messages": "https://api.engineyard.com/requests/c81dceb6-7b80-425b-91dd-a86abe42b7fd/messages",
              "callback_url": "https://api.engineyard.com/requests/c81dceb6-7b80-425b-91dd-a86abe42b7fd/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/218"
            }
          }