Operazioni sulla configurazione delle API

2 operazioni di nome apiConfig.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.

Aggiornato il
OperationWhat it doesPermissionConfirmation
apiConfig.readRead the site's API configuration: the external API sources (each a base URL the public site's proxy may call), the shared headers, the baseUrl and the named requests the site's data calls use.site.readnone
apiConfig.updateReplace the site's API configuration as a whole: baseUrl, headers, sources (the public proxy forwards only to a URL under a source's base URL) and requests ({ id, name, method, endpoint, sourceId?, body?, contract? }).site.adminnone

apiConfig.read

Read the site's API configuration: the external API sources (each a base URL the public site's proxy may call), the shared headers, the baseUrl and the named requests the site's data calls use.

permission: site.readreads onlyclass: read

Esempio di input

{}

Input

L’input è un record: vedi lo schema qui sotto.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
configobject | nullyes

Provala

yarn splash apiConfig.read '{}' --dry-run

apiConfig.update

Replace the site's API configuration as a whole: baseUrl, headers, sources (the public proxy forwards only to a URL under a source's base URL) and requests ({ id, name, method, endpoint, sourceId?, body?, contract? }). Undo restores the previous configuration.

permission: site.adminwrites: apiConfigclass: transactionundo: yes

Esempio di input

{
  "headers": [],
  "sources": [],
  "requests": [
    {
      "id": "feed",
      "name": "Feed",
      "method": "GET",
      "endpoint": "/feed"
    }
  ]
}

Input

FieldTypeRequiredNotes
baseUrlstringno
headersarray of objectyes
headers[].keystringyes
headers[].valuestringyes
headers[].typestringno
headers[].sourcestring | nullno
sourcesarray of objectnoDefault [].
sources[].idstringyes
sources[].namestringyes
sources[].baseUrlstringyes
sources[].colorstring | nullno
requestsarray of objectyes
requests[].idstringyes
requests[].namestringyes
requests[].methodstringyes
requests[].endpointstringyes
requests[].sourceIdstring | nullno
requests[].bodyrecord of any JSONno
requests[].contractrecord of stringno

Output

FieldTypeRequiredNotes
configobject | nullyes

Provala

yarn splash apiConfig.update '{"headers":[],"sources":[],"requests":[{"id":"feed","name":"Feed","method":"GET","endpoint":"/feed"}]}' --dry-run

Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 9efb1801fba294e2).

Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.

Guida di Libretto

Colophon. Questa guida è un sito Libretto: 70 pagine in due lingue, 21 pagine della guida importate da Markdown e 42 pagine di riferimento generate dal registro delle operazioni. Composta in Softcore, il codice in IBM Plex Mono. La sua struttura:

/it/ Guida di Libretto /it/start Per iniziare /it/start/request-access Richiedere l'accesso /it/start/workspace Il tuo spazio di lavoro /it/start/first-site Il tuo primo sito /it/start/invite-a-client Invitare un cliente /it/start/connect-claude Connettere Claude a Libretto /it/build Costruire /it/build/first-page Costruire una pagina /it/build/layers-and-canvas Livelli e canvas /it/build/site-components Componenti del sito /it/design-system Design system /it/design-system/tokens Colori, spazi e temi /it/design-system/components Componenti e varianti /it/design-system/fonts Tipografia e font /it/motion Movimento /it/motion/scenes Scene e ricette /it/motion/image-sequences Sequenze di immagini /it/motion/reduced-motion Movimento ridotto /it/publish Pubblicazione /it/publish/languages Le lingue del sito /it/publish/versions Pubblicazione e versioni /it/publish/members-and-forms Iscritti e moduli /it/publish/domains Domini /it/publish/redirects Reindirizzamenti /it/handover Consegnare un sito al cliente /it/glossary Glossario /it/agents Agenti e API /it/agents/mcp Server MCP /it/agents/cli CLI /it/agents/batches Batch /it/agents/errors Errori e segnalazioni /it/agents/operations Operazioni /it/search Cerca