CorefinityCorefinityDocs
Open the Control PanelControl Panel
Firewall · 11 of 20

Get the address you are calling from

Answers the address this request came from, whether it can connect to the environment now, and the levels it can be added at with what each opens. The address is always the one the request came from; it cannot be sent.

GET/api/firewall/my-ip

Query parameters

environment_idintegerRequired

The environment to check the address against. At least 1.

Returns

200 The address and where it can be added.

Fields of the 200 answer
addressstringRequired
allowedbooleanRequired
familyintegerRequired
46
optionsarray of objectsRequired
Fields of each item
descriptionstringRequired
labelstringRequired
levelstringRequired

me adds it for yourself, on every environment you can reach.

meenvironmentwebsitecompany
reachobjectRequired

What an address at this level opens.

Fields
environmentsintegerRequired
websitesintegerRequired
reasonstring or nullRequired

address_refused is a private, shared, reserved or provider range, platform_address an address of Corefinity. Null when the address can be added.

address_refusedplatform_addressnull
usablebooleanRequired

False when this address cannot be added; reason says why.

viaarray of objectsRequired
Fields of each item
cidrstringRequired
entry_idinteger or nullRequired
layerstringRequired
agencycompanywebsiteenvironmentuserpresethttp_auth_rule
ownerobjectRequired

Where 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
idintegerRequired

At least 1.

namestringRequired
typestringRequired
companywebsiteenvironmentuserhttp_auth_rule
subscription_idinteger or nullRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404feature_offThis feature is not on for your organisation yet.
404not_foundNot found.
422invalid_argumentsThe 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.
429rate_limitedWait 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/firewall/my-ip?environment_id=1311' \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "address": "198.51.100.24",
  "allowed": false,
  "family": 4,
  "options": [
    {
      "description": "Every environment you can reach",
      "label": "Me",
      "level": "me",
      "reach": {
        "environments": 1,
        "websites": 1
      }
    },
    {
      "description": "Production of harbourandfinch.example.com",
      "label": "This environment",
      "level": "environment",
      "reach": {
        "environments": 1,
        "websites": 1
      }
    },
    {
      "description": "Every environment of harbourandfinch.example.com",
      "label": "This website",
      "level": "website",
      "reach": {
        "environments": 1,
        "websites": 1
      }
    },
    {
      "description": "Every Harbour & Finch environment",
      "label": "My company",
      "level": "company",
      "reach": {
        "environments": 1,
        "websites": 1
      }
    }
  ],
  "reason": null,
  "usable": true,
  "via": []
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT