Get a site's outbound (egress) policy
GET /api/sites/{name}/egress
Needs a Viewer or Admin key.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
name |
path | string | Required. |
Replies
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | EgressPolicy |
| 404 | Not Found | none |
Reply fields
| Field | Type | Description |
|---|---|---|
siteName |
string | The site the policy belongs to. Always present. |
enabled |
boolean | True to apply the policy. False keeps it saved but applies no outbound rules. Always present. |
mode |
EgressMode |
Audit records the outbound connections the policy would stop without stopping them; Enforce stops every connection not on the allowlist. Always present. One of Audit, Enforce. |
allowedRemotes |
list of string | The remote addresses or ranges (for example 203.0.113.5 or 10.0.0.0/24) the site may connect out to, such as its database and payment gateway. PortWall's own essential destinations are always allowed in addition. Always present. |
programPath |
string | The program whose outbound connections are controlled. Defaults to the IIS web worker process when not given. Always present. |
updatedBy |
string | Who last set the policy: the signed-in user or API key name. Can be null. |
updatedAt |
date-time | When the policy was last set. Always present. |
Set a site's outbound (egress) policy
PUT /api/sites/{name}/egress
Needs an Admin key.
Limits what the site's application may connect out to: only allowedRemotes (addresses or ranges). Start with mode Audit, which only records, then Enforce.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
name |
path | string | Required. |
Request body: EgressPolicyUpdate
| Field | Type | Description |
|---|---|---|
enabled |
boolean | True to apply the policy. False keeps it saved but applies no outbound rules. |
mode |
EgressMode |
Audit records the outbound connections the policy would stop without stopping them; Enforce stops every connection not on the allowlist. Required. One of Audit, Enforce. |
allowedRemotes |
list of string | The remote addresses or ranges (for example 203.0.113.5 or 10.0.0.0/24) the site may connect out to, such as its database and payment gateway. PortWall's own essential destinations are always allowed in addition. Optional. |
programPath |
string | The program whose outbound connections are controlled. Defaults to the IIS web worker process when not given. Optional. |
Replies
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | EgressPolicy |
| 400 | Bad Request | ApiError |
| 404 | Not Found | none |
Reply fields
| Field | Type | Description |
|---|---|---|
siteName |
string | The site the policy belongs to. Always present. |
enabled |
boolean | True to apply the policy. False keeps it saved but applies no outbound rules. Always present. |
mode |
EgressMode |
Audit records the outbound connections the policy would stop without stopping them; Enforce stops every connection not on the allowlist. Always present. One of Audit, Enforce. |
allowedRemotes |
list of string | The remote addresses or ranges (for example 203.0.113.5 or 10.0.0.0/24) the site may connect out to, such as its database and payment gateway. PortWall's own essential destinations are always allowed in addition. Always present. |
programPath |
string | The program whose outbound connections are controlled. Defaults to the IIS web worker process when not given. Always present. |
updatedBy |
string | Who last set the policy: the signed-in user or API key name. Can be null. |
updatedAt |
date-time | When the policy was last set. Always present. |
Remove a site's outbound (egress) policy
DELETE /api/sites/{name}/egress
Needs an Admin key.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
name |
path | string | Required. |
Replies
| Status | Meaning | Body |
|---|---|---|
| 204 | No Content | none |
| 404 | Not Found | none |
Updated 2026-10-27Something unclear or missing? Tell us.