CorefinityCorefinityDocs
Open the Control PanelControl Panel
Redirects · 1 of 5

Get a site's redirects

Answers the redirect rules in the order they are tried, with the version every save sends back and the domains a rule can be limited to.

GET/api/corestack/sites/{site}/redirects

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The redirect set.

Fields of the 200 answer
applyobjectRequired

Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
available_hostsarray of objectsRequired

The domains a rule can be limited to.

Fields of each item
hoststringRequired
rolestringRequired

The domain's role, such as primary or alias.

formatsarray of stringsRequired

The formats import and export take.

host_scopingbooleanRequired

Whether a rule can be limited to some domains at the moment.

hostsarray of stringsRequired

The domains the site answers on.

limitsobjectRequired
Fields
from_maxintegerRequired
import_max_bytesintegerRequired
regex_maxintegerRequired
rules_maxintegerRequired
to_maxintegerRequired
rulesarray of objectsRequired
Fields of each item
enabledbooleanRequired
fromstringRequired
hostsarray of strings or nullRequired

The domains the rule is limited to. Null for every domain.

idinteger or nullRequired

The rule's id. Null for a rule that is not saved yet, as in an import or a test of unsaved rules.

keep_querybooleanRequired
notestring or nullRequired
positionintegerRequired

The rule's place in the table, starting at 1. A rule whose path is the address asked for (an exact rule, or a prefix rule's own path) is taken first, whatever its position. Otherwise prefix and regex rules are tried in this order, and the first match wins. On a domain, the rules limited to it are taken this way before the rules for every domain.

shadowed_byinteger or nullRequired

The id of an earlier rule that always answers first, so this one never matches.

statusintegerRequired
301302
tostringRequired
typestringRequired
exactprefixregex
versionintegerRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409deletedThe site, environment or copy has been deleted, or is being deleted. Nothing can be changed on it. Restore a deleted site first if it can still be restored.
409provisioningThe site is still being created. Try again in a few minutes.
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/corestack/sites/1042/redirects \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "apply": {
    "applied_at": "2026-11-02T15:41:09Z",
    "error": null,
    "operation": null,
    "state": "applied",
    "state_label": "Applied"
  },
  "available_hosts": [
    {
      "host": "harbourandfinch.example.com",
      "role": "primary"
    },
    {
      "host": "www.harbourandfinch.example.com",
      "role": "alias"
    }
  ],
  "formats": [
    "nginx",
    "apache",
    "csv"
  ],
  "host_scoping": true,
  "hosts": [
    "harbourandfinch.example.com",
    "www.harbourandfinch.example.com"
  ],
  "limits": {
    "from_max": 2000,
    "import_max_bytes": 524288,
    "regex_max": 256,
    "rules_max": 2000,
    "to_max": 2000
  },
  "rules": [
    {
      "enabled": true,
      "from": "/about-us.html",
      "hosts": null,
      "id": 41,
      "keep_query": true,
      "note": "Old brochure page",
      "position": 1,
      "shadowed_by": null,
      "status": 301,
      "to": "/about",
      "type": "exact"
    },
    {
      "enabled": true,
      "from": "/blog",
      "hosts": [
        "www.harbourandfinch.example.com"
      ],
      "id": 42,
      "keep_query": true,
      "note": null,
      "position": 2,
      "shadowed_by": null,
      "status": 301,
      "to": "/news",
      "type": "prefix"
    }
  ],
  "version": 12
}
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