TODO
Rules are used to open up internal ports to be accessible through the firewall from the outside (public).
Returns a list of rule resources currently configured in your applications firewall.
GET /rest/applications/43678cada57a6b839653929905ff90129ab78c9e64cb6f5756ccacabc1f34a59/firewall/rules
[
{
"id": "22-tcp",
"protocol": "tcp",
"internal_port": 22,
"public_port": 10019,
"public_hostname": "d9tready.com",
"links":
{
"href": "https://d9tready.com/rest/applications/43678cada57a6b839653929905ff90129ab78c9e64cb6f5756ccacabc1f34a59/firewall/rules/22-tcp",
"rel": "self"
}
},
...
]
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
| 404 NOT FOUND | Resource not found |
Retrieve a single rule resource.
GET /rest/applications/43678cada57a6b839653929905ff90129ab78c9e64cb6f5756ccacabc1f34a59/firewall/rules/22-tcp
{
"protocol": "tcp",
"internal_port": 22,
"public_port": 10019,
"public_hostname": "d9tready.com"
}
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
| 404 NOT FOUND | Resource not found |
Add a rule to the application firewall.
POST /rest/applications/43678cada57a6b839653929905ff90129ab78c9e64cb6f5756ccacabc1f34a59/firewall/rules
{
"protocol": "<PROTOCOL>",
"internal_port": "<PORT>"
}
On successful creation the URL to the new rule resource is set in the Location-Header.
HTTP/1.0 201 CREATED
Location: https://d9tready.com/rest/applications/<CONTAINER_ID>/firewall/rules/<RULE>
| Status Code | Description |
|---|---|
| 201 CREATED | Successful creation of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 403 FORBIDDEN | Authentication failure |
Permanently delete a rule resource.
DELETE /rest/applications/43678cada57a6b839653929905ff90129ab78c9e64cb6f5756ccacabc1f34a59/firewall/rules/22-tcp
| Status Code | Description |
|---|---|
| 204 NO CONTENT | Successful deletion of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 403 FORBIDDEN | Authentication failure |