CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 36 of 65

corestack_deployments_template_environments_reset

Reset environments to their template.

Scope writeAlso exec to reveal secretsAsks you to confirmNo secrets returned
On this page

When to use it

Make stages of several environments follow your company's deployment template again (stages, or ["all"], per target): the template's content is written into each now, all or nothing, and each environment's previous version stays restorable. Call it with dry_run: true first. Production targets need confirm_production: true and confirm_count = their count. Your access must cover every target; a target that gains commands it does not run now also needs exec.

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

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_template_environments_reset with platform magento2, targets [{"site_id":4212,"stages":["post_deploy"]}], dry_run true. (Reset environments to their template.) Tell me what it returned.

Inputs

confirm_countintegerConfirmation

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

confirm_productionbooleanConfirmation
dry_runboolean

Answer what changes per target; write nothing.

platformstringRequired
magento2laravelwordpressshopware5
targetsarray of objectsRequired

Up to 200 items.

Fields of each item
site_idintegerRequired

At least 1.

stagesarray of stringsRequired

The stages, or ["all"]. Up to 4 items.

builddatabasepost_deploysettingsall

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_deployments_template_environments_reset",
  "arguments": {
    "platform": "magento2",
    "targets": [
      {
        "site_id": 4212,
        "stages": [
          "post_deploy"
        ]
      }
    ],
    "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.
confirmProduction targets are named; send confirm_production: true and their count.
reach_changedThe production targets' count no longer matches; run the dry run again.
template_refused_onA target cannot take it (details names the target and its reason); nothing was written.
pipeline_classicA target still runs its classic pipeline.
not_reachedA target does not follow this template.
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.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT