Operazioni sull’ambiente
2 operazioni di nome environment.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| environment.read | List the names of the site's environment variables. | site.read | none |
| environment.update | Replace the site's environment variables as a whole: variables maps each name to its new value, or to null to keep the stored value; a name left out is deleted, and null for a name with no stored value is refused. | site.admin | none |
environment.read
List the names of the site's environment variables. Their values are never answered: each comes back as null.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| variables | record of null | yes |
Provala
yarn splash environment.read '{}' --dry-runenvironment.update
Replace the site's environment variables as a whole: variables maps each name to its new value, or to null to keep the stored value; a name left out is deleted, and null for a name with no stored value is refused. The input is redacted from the history and the audit log; undo restores the previous set.
Esempio di input
{
"variables": {
"NEWSLETTER_LIST_ID": "list-42"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| variables | record of string | null | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| variables | record of null | yes |
Provala
yarn splash environment.update '{"variables":{"NEWSLETTER_LIST_ID":"list-42"}}' --dry-runGenerato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente f1d45b173d45554c).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.