corestack_ environment_ update
Change an environment's settings.
When to use it
Change an environment's settings: its name (a label — the address never changes), scheduled snapshots, automatic deployment, or HTTP authentication for the whole environment.
Ask for it
Using the Corefinity MCP server, call corestack_environment_update with site_id 4211, auto_deploy false. (Change an environment's settings.) Tell me what it returned.Inputs
auto_deployboolean
Git rows only.
http_auth_enabledboolean
The whole-environment rule; needs a / rule.
namestring
A label of 1–40 characters, without < or >, that no other environment of the site shows (production always shows as Production). The hostname never changes.
scheduled_snapshotsboolean
Scheduled backups for this environment. Every staging environment starts with it off — including one moved from CoreStack Enterprise — and production starts with it on; the customer switches it on per environment here, in the Control Panel or in the API.
site_idintegerRequired
The environment's own row (production included). At least 1.
Example call
{
"name": "corestack_environment_update",
"arguments": {
"site_id": 4211,
"auto_deploy": false
}
}If it is refused
| Reason | What to do |
|---|---|
pin_refused | The environment shown for this site is outside the token's pins. This is checked before reading live status or changing settings, including for existing tokens when a site becomes staging-only. Add the site using the returned link, or address a covered environment by its own site_id. The refusal names only the requested row. A successful reply describes the environment admitted at the start of that call, even if the display environment changes while work runs; the next call checks the current display environment again. |
managed_elsewhere | Another 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_arguments | On name: the name is empty, longer than 40 characters, or contains < or > ("An environment name cannot contain < or >"); another environment of the site already shows it ("Another environment of this site is already called {name}"); or the environment's deployments use its name ("This environment's deployments use its name, so it cannot be renamed. Contact support."). Nothing was changed. |
forbidden | auto_deploy would switch automatic deployment on or off and the person's role lacks the Manage Deployment Source permission, or would switch it on and the role lacks the Create Deployments permission (a push that deploys on its own is a deployment). The message names the permission and says an owner of the company can grant it in Roles; details.permission is manageDeploymentSource or createDeployments. Nothing is changed. Sent as it already is, auto_deploy is no change. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
The same task elsewhere
Was this helpful?