CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 6 of 14

corestack_nginx_rules_revert

Restore an nginx rules revision.

Scope writeRuns as a taskNo secrets returned
On this page

When to use it

Restore an earlier nginx rules revision on an environment row: its four hooks become a new revision, checked, tested and saved like any change (rolled back automatically if the platform rejects it). Needs the version corestack_nginx_rules_get answered.

Every hook takes the old revision's text, a hook it did not have included (cleared). The answer and the task are corestack_nginx_rules_update's.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_nginx_rules_revert with site_id 4211, revision_id 812, version 7. (Restore an nginx rules revision.) Tell me what it returned.

Inputs

applystring

Only when the restored rules adopt the runtime update on save: now or tonight. Default now. window: the row's next maintenance window (tonight is kept as its alias). Defaults to now.

nowwindowtonight
notestring

Why, shown in the history (default "Restored revision N"). Up to 200 characters.

revision_idintegerRequired

The revision to restore (from corestack_nginx_rules_history_list). At least 1.

site_idintegerRequired

The environment row. At least 1.

test_idinteger

A passed test for this same content. At least 1.

versionintegerRequired

The version from corestack_nginx_rules_get. At least 0.

Example call

tools/call
{
  "name": "corestack_nginx_rules_revert",
  "arguments": {
    "site_id": 4211,
    "revision_id": 812,
    "version": 7
  }
}

If it is refused

ReasonWhat to do
staleThe rules changed since version was read; read them again with corestack_nginx_rules_get.
nginx_invalidThe policy refused the rules; details.diagnostics lists each error with hook, file line and column.
nginx_test_failedNginx -t failed on the environment's nginx; details.diagnostics.
hook_unavailableA hook (or a rule) needs the one-time runtime update, which cannot be turned on for this environment yet.
nginx_rules_lockedCorefinity staff hold this environment's nginx rules.
busyAnother change runs on the environment; retry when it ends.
change_pendingA change is queued for tonight.
batch_windowAdopting now is not possible outside the environment's window; send apply: tonight.
migration_haltedThe night's migration is halted; send apply: tonight.
apm_provenance_unreadableimage_volume_unsupported, legacy_module_unmapped: the runtime update cannot be turned on until Corefinity checks the environment (contact support).
too_largeA hook is over its size limit.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
invalid_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.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

Path apps

A revert restores the revision's path apps and gates with its four hooks: the environment's whole list becomes the revision's (a revision without any clears the list). The restored list is checked as any saved one: a record the policy refuses is nginx_invalid with the record named in details.diagnostics (hook path_apps). While this environment cannot serve path apps (corestack_nginx_rules_get answers path_apps.available false), the hooks are restored and the current list is kept.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT