POST /v2/firewalls/{firewall_id}/rules
To add additional access rules to a firewall, send a POST request to
/v2/firewalls/$FIREWALL_ID/rules
. The body of the request may include an
inbound_rules and/or outbound_rules attribute containing an array of rules to
be added.
No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.
Servers
- https://api.digitalocean.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
firewall_id |
String | Yes |
A unique ID that can be used to identify and reference a firewall. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
outbound_rules[] |
Array | No | |
outbound_rules[].protocol |
String | Yes |
The type of traffic to be allowed. This may be one of Possible values:
|
outbound_rules[].ports |
String | Yes |
The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". |
inbound_rules[] |
Array | No | |
inbound_rules[].protocol |
String | Yes |
The type of traffic to be allowed. This may be one of Possible values:
|
inbound_rules[].ports |
String | Yes |
The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.