Get an environment's firewall
Answers every address that reaches the environment, from every level, with the presets attached, the address this request came from, and how far the firewall is in force on the environment.
Path parameters
The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.
Returns
200 The environment's firewall.
Fields of the 200 answer
True when SSH is refused to every address that is not listed.
False for an environment whose SSH the firewall does not manage.
How far the firewall is in force on the environment.
Fields
darkprepareenforcepauseddeferredThe addresses, from every level that reaches the environment.
Fields of each item
Who added an address or made a change.
Fields
Null when the person has been removed, or when Corefinity support added the address.
The person Corefinity support added it for.
True when Corefinity support added the address for a customer.
Where a carried address came from.
When the entry last changed where it applies. Compare it with a target's applied_at to tell whether the change is live there. Format: date-time.
The address in CIDR form. A single address reads /32 (IPv6 /128). Removing the entry asks you to send this back.
Format: date-time.
Corefinity's reason, once a range request is rejected.
Whether you may change or remove the entry.
When the address stops being allowed. Null for no expiry. Format: date-time.
The IP version.
46The entry id the /firewall/entries/{entry} endpoints take.
The level the address comes from, as you see it. agency is an address of your agency.
agencycompanywebsiteenvironmentuserpresethttp_auth_ruleWhere an address is held: a company, a website, an environment or a person. http_auth_rule is an address carried over with a password-protected path.
Fields
At least 1.
companywebsiteenvironmentuserhttp_auth_ruleThe protected path of a carried http_auth_rule address.
The reason given with a range request.
What an address may reach.
Fields
The address may connect over SSH.
The address sees the website without the HTTP authentication login or the maintenance page.
How the entry came to be, such as manual, one_click (the address you were calling from) or an import.
manualone_clickon_behalfip_whitelistlegacy_importlegacy_usagegcp_rule_importlegacy_deltaplatform_seedhttp_auth_carrypending_approval is a range request waiting for Corefinity. removing lasts until the address is gone everywhere.
activepending_approvalrejectedremovingexpiredTrue while the address's website access is paused by the platform.
An environment, with the website and company it belongs to.
Fields
Fields
At least 1.
The environment id, the {environment} these endpoints take and the owner_id of an environment entry.
cse is CoreStack Enterprise.
csecorestackcoreclusterThe site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.
Fields
At least 1.
The older open SSH access of the environment, while it lasts.
Fields
Whether the Control Panel shows a notice about it.
The day it ends, once a day is set. Format: date.
noneopenendingendedThe presets attached at any level that reaches the environment.
Fields of each item
Who added an address or made a change.
Fields
Null when the person has been removed, or when Corefinity support added the address.
The person Corefinity support added it for.
True when Corefinity support added the address for a customer.
Format: date-time.
Whether you may detach it.
The id DELETE / takes.
agencycompanywebsiteenvironmentuserpresethttp_auth_ruleWhere an address is held: a company, a website, an environment or a person. http_auth_rule is an address carried over with a password-protected path.
Fields
At least 1.
companywebsiteenvironmentuserhttp_auth_ruleThe published address ranges of a common service, kept up to date by Corefinity.
Fields
At least 1.
How many ranges the preset holds.
The preset's short name. Detaching it asks you to send this back.
Who can reach SSH now.
Fields
The day the older access ends, once a day is set. Format: date.
restricted: only listed addresses. legacy_open: the older open access continues. legacy_list: listed addresses and Corefinity's older SSH allow list. world_open: Corefinity has opened the environment to everyone. not_enforced: the firewall is not in force.
world_openlegacy_openlegacy_listrestrictednot_enforcedThe SSH ports the list is applied to.
Fields of each item
When the list was last applied to the port. Format: date-time.
Why the last apply failed, in plain words.
True while the port is being moved.
pendingapplyingappliedfaileddriftdeletingabsentThe address this request came from, and whether it can connect.
Fields
The entries and presets that allow it.
Fields of each item
agencycompanywebsiteenvironmentuserpresethttp_auth_ruleWhere an address is held: a company, a website, an environment or a person. http_auth_rule is an address carried over with a password-protected path.
Fields
At least 1.
companywebsiteenvironmentuserhttp_auth_ruleIf it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/environments/1311/firewall \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/environments/1311/firewall');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/environments/1311/firewall', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/environments/1311/firewall",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"closed_by_default": true,
"covered": true,
"enforcement": {
"stage": "enforce"
},
"entries": [
{
"added_by": {
"name": "Eleanor Finch",
"on_behalf_of": null,
"support": false
},
"carried_from": null,
"changed_at": "2026-11-01T10:02:44Z",
"cidr": "203.0.113.7/32",
"comment": "Office",
"created_at": "2026-11-01T10:02:44Z",
"decision_reason": null,
"editable": true,
"expires_at": null,
"family": 4,
"id": 9001,
"layer": "company",
"owner": {
"id": 1204,
"name": "Harbour & Finch",
"type": "company"
},
"path": null,
"request_reason": null,
"scope": {
"ssh": true,
"web": true
},
"source": "manual",
"status": "active",
"web_paused": false
}
],
"environment": {
"company": {
"id": 1204,
"name": "Harbour & Finch"
},
"id": 1311,
"name": "Production",
"product": "corecluster",
"site_id": 1042,
"website": {
"id": 1310,
"name": "harbourandfinch.example.com"
}
},
"legacy": {
"banner": false,
"ends_on": null,
"state": "none"
},
"presets": [
{
"added_by": {
"name": "Eleanor Finch",
"on_behalf_of": null,
"support": false
},
"created_at": "2026-11-01T10:05:10Z",
"editable": true,
"id": 310,
"layer": "company",
"owner": {
"id": 1204,
"name": "Harbour & Finch",
"type": "company"
},
"preset": {
"description": "The addresses GitHub Actions runners connect from.",
"id": 14,
"name": "GitHub Actions",
"ranges_count": 1,
"slug": "github-actions"
}
}
],
"ssh_reach": {
"ends_on": null,
"state": "restricted"
},
"targets": [
{
"applied_at": "2026-11-01T10:05:31Z",
"last_error_public": null,
"moving": false,
"port": 21044,
"state": "applied"
}
],
"your_address": {
"address": "203.0.113.7",
"allowed": true,
"via": [
{
"cidr": "203.0.113.7/32",
"entry_id": 9001,
"layer": "company",
"owner": {
"id": 1204,
"name": "Harbour & Finch",
"type": "company"
},
"subscription_id": null
}
]
}
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}