corestack_ deployments_ variable_ set
Set a deployment variable.
When to use it
Create or change one of the environment's deployment variables, which every stage receives as CF_<name>. Send value, log_visibility or both. The value is write-only: it is never shown again here.
The same action in the public REST API, with the same checks, refusals and scope: PUT /.
Ask for it
Using the Corefinity MCP server, call corestack_deployments_variable_set with site_id 4211, name API_URL, value https://api.example.com, log_visibility shown. (Set a deployment variable.) Tell me what it returned.Inputs
log_visibilitystring
hidden (default) masks it in deployment output.
hiddenshownnamestringRequired
Without the CF_ prefix.
site_idintegerRequired
At least 1.
valuestring
Up to 2,048 characters.
Example call
{
"name": "corestack_deployments_variable_set",
"arguments": {
"site_id": 4211,
"name": "API_URL",
"value": "https://api.example.com",
"log_visibility": "shown"
}
}If it is refused
| Reason | What to do |
|---|---|
variable_reserved | That name is reserved for a value the platform sets. |
variable_tool_credential | A new variable named as a build tool's credential (COMPOSER_AUTH, NPM_TOKEN, NODE_AUTH_TOKEN, YARN_NPM_AUTH_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, in any case; details.field is name). Builds receive every variable as CF_<name>, so the tool would never read it: "Builds see this variable as CF_COMPOSER_AUTH, so Composer never reads it. Add the credentials under Deployments > Private registries instead." Save the credentials with corestack_deployments_secret_set instead. An existing variable of such a name is kept and can still be changed or deleted; the list marks it with the same sentence as its tool_credential. |
variable_invalid | The value has a line break, a control character or is too long. |
invalid_arguments | log_visibility: shown without a value, for a variable whose stored value is hidden (showing it would reveal it): "Send the value with log_visibility shown. A stored value is read only through its reveal." |
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. |
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. |
pin_refused | The 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_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?