CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 34 of 65

corestack_deployments_template_restore

Restore a deployment template version.

Scope writeAsks you to confirmNo secrets returned
On this page

When to use it

Restore an earlier revision of your company's deployment template (version_id, from corestack_deployments_template_versions_list), or every stage back to Corefinity's default (version: "corefinity"). It is saved as a new revision equal to the chosen one and written into every environment it reaches, as a save is. Call it with dry_run: true first and confirm production as a stage save does. Restoring needs write only. It applies to the whole company.

The same action in the public REST API, with the same checks, refusals and scope: POST /api/corestack/companies/{company}/deploy-templates/{platform}/restore.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_template_restore with platform magento2, version_id 3, revision 5, dry_run true. (Restore a deployment template version.) Tell me what it returned.

Inputs

confirm_countintegerConfirmation

The production count of the dry run. At least 0.

confirm_productionbooleanConfirmation
confirm_targetsarray of integersConfirmation

The dry run's production[].site_id.

dry_runboolean

Answer the reach; write nothing.

keep_onarray of integers

site_ids that keep their own stage: every cannot_take one.

platformstringRequired
magento2laravelwordpressshopware5
revisionintegerRequired

The template revision you read. At least 0.

versionstring

Instead of version_id: every stage back to Corefinity's default.

corefinity
version_idinteger

The revision to restore (corestack_deployments_template_versions_list). At least 1.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_deployments_template_restore",
  "arguments": {
    "platform": "magento2",
    "version_id": 3,
    "revision": 5,
    "dry_run": true
  }
}

If it is refused

ReasonWhat to do
forbiddenThe person's role lacks the Edit Environment Deployment Pipeline permission, which every change to the company's templates, variables and registry secrets needs (they reach every environment that follows the template). The message names it and says an owner of the company can grant it in Roles; details.permission is editEnvironmentDeploymentPipeline. Nothing is changed.
version_unavailableThat revision is not kept for this template.
staleThe template changed since you read it; read it again and resend.
template_lockedCorefinity has locked this template.
reach_changedThe production environments changed since your dry run; run it again and confirm the new list.
confirmProduction is reached; send the confirmation from the dry run.
template_refused_onAn environment cannot take it; add it to keep_on.
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.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT