Delete a firewall entry
Removes an address from its list. Send the address back in confirm_address, in the request body, exactly as the list shows it in cidr. The entry reads removing until the address is gone from every environment it reached.
Path parameters
The id of a firewall entry, as the lists answer it in id. Digits only. At least 1.
Body
The entry's address, exactly as the lists answer it in cidr. Up to 64 characters.
Returns
202 The removal was started. Follow change_id with GET /firewall/changes/{change}. An entry that is already being removed answers the change of the removal under way. Poll the operation until it finishes.
Fields of the 202 answer
The change to follow with GET /firewall/changes/{change}. Null when nothing needs applying.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | firewall_not_editable | You can see this entry but you cannot change it. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
422 | confirm_mismatch | Send the confirmation exactly as the field named in field asks for it. |
422 | invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
429 | firewall_throttled | Too many firewall changes. Wait a minute and try again. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X DELETE https://manage.corefinity.com/api/firewall/entries/9001 \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"confirm_address": "203.0.113.7/32"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->delete('https://manage.corefinity.com/api/firewall/entries/9001', [
'confirm_address' => '203.0.113.7/32',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/firewall/entries/9001', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
confirm_address: '203.0.113.7/32',
}),
});
// 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.delete(
"https://manage.corefinity.com/api/firewall/entries/9001",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"confirm_address": "203.0.113.7/32",
},
)
data = res.json() if res.content else None{
"change_id": 5313
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "confirm_mismatch",
"errors": {
"confirm_address": [
"The confirmation does not match."
]
},
"field": "confirm_address",
"message": "The confirmation does not match.",
"reason": "confirm_mismatch"
}{
"code": "firewall_throttled",
"field": null,
"message": "Too many firewall changes. Wait a minute and try again.",
"reason": "firewall_throttled"
}Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.