Firewall rules API


Delete a firewall

DELETE /firewall-rules/:firewall_rule

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_firewall_rule",
              "id": "50ca187a-4e5b-4843-96ee-66435cbf711c",
              "created_at": "2017-02-22T17:03:02+00:00",
              "started_at": "2017-02-22T17:03:02+00:00",
              "finished_at": "2017-02-22T17:03:02+00:00",
              "message": null,
              "request_status": "Finished: Deprovision firewall rule (50ca187a-4e5b-4843-96ee-66435cbf711c) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:03:02+00:00",
              "read_channel": null,
              "stage": "cleanup",
              "dependencies": "https://api.engineyard.com/requests/50ca187a-4e5b-4843-96ee-66435cbf711c/dependencies",
              "stages": "https://api.engineyard.com/requests/50ca187a-4e5b-4843-96ee-66435cbf711c/stages",
              "account": "https://api.engineyard.com/accounts/56ec1e10-3462-4f4f-b5d1-44f66b54c2dd",
              "requester": "https://api.engineyard.com/requests/50ca187a-4e5b-4843-96ee-66435cbf711c/requester",
              "messages": "https://api.engineyard.com/requests/50ca187a-4e5b-4843-96ee-66435cbf711c/messages",
              "callback_url": "https://api.engineyard.com/requests/50ca187a-4e5b-4843-96ee-66435cbf711c/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/23"
            }
          }
            
          








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": 2
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_firewall_rule",
              "id": "c965325c-ab7c-4aba-8a64-1e00f42ce808",
              "created_at": "2017-02-22T17:02:44+00:00",
              "started_at": "2017-02-22T17:02:44+00:00",
              "finished_at": "2017-02-22T17:02:44+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (c965325c-ab7c-4aba-8a64-1e00f42ce808) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:02:44+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/c965325c-ab7c-4aba-8a64-1e00f42ce808/dependencies",
              "stages": "https://api.engineyard.com/requests/c965325c-ab7c-4aba-8a64-1e00f42ce808/stages",
              "account": "https://api.engineyard.com/accounts/86cb1d0e-e660-4172-9408-f8910a5060ff",
              "requester": "https://api.engineyard.com/requests/c965325c-ab7c-4aba-8a64-1e00f42ce808/requester",
              "messages": "https://api.engineyard.com/requests/c965325c-ab7c-4aba-8a64-1e00f42ce808/messages",
              "callback_url": "https://api.engineyard.com/requests/c965325c-ab7c-4aba-8a64-1e00f42ce808/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/17"
            }
          }
            
          








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": "e9def9de-9b1a-470e-ad3e-170d0d6300ef",
              "created_at": "2017-02-22T17:02:15+00:00",
              "started_at": "2017-02-22T17:02:15+00:00",
              "finished_at": "2017-02-22T17:02:15+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (e9def9de-9b1a-470e-ad3e-170d0d6300ef) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:02:15+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/e9def9de-9b1a-470e-ad3e-170d0d6300ef/dependencies",
              "stages": "https://api.engineyard.com/requests/e9def9de-9b1a-470e-ad3e-170d0d6300ef/stages",
              "account": "https://api.engineyard.com/accounts/5d358793-dac0-4221-802a-3fcebffb1db2",
              "requester": "https://api.engineyard.com/requests/e9def9de-9b1a-470e-ad3e-170d0d6300ef/requester",
              "messages": "https://api.engineyard.com/requests/e9def9de-9b1a-470e-ad3e-170d0d6300ef/messages",
              "callback_url": "https://api.engineyard.com/requests/e9def9de-9b1a-470e-ad3e-170d0d6300ef/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/6"
            }
          }