API configuration operations
2 operations named apiConfig.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| apiConfig.read | apiConfig.read with validated settings and revisioned undo. | site.read | none |
| apiConfig.update | apiConfig.update with validated settings and revisioned undo. | site.admin | none |
apiConfig.read
apiConfig.read with validated settings and revisioned undo.
Example input
{}Input
The input is a record; see the schema below.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| config | object | null | yes |
Try it
yarn splash apiConfig.read '{}' --dry-runapiConfig.update
apiConfig.update with validated settings and revisioned undo.
Example input
{
"headers": [],
"sources": [],
"requests": [
{
"id": "feed",
"name": "Feed",
"method": "GET",
"endpoint": "/feed"
}
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| baseUrl | string | no | |
| headers | array of object | yes | |
| headers[].key | string | yes | |
| headers[].value | string | yes | |
| headers[].type | string | no | |
| headers[].source | string | null | no | |
| sources | array of object | no | Default []. |
| sources[].id | string | yes | |
| sources[].name | string | yes | |
| sources[].baseUrl | string | yes | |
| sources[].color | string | null | no | |
| requests | array of object | yes | |
| requests[].id | string | yes | |
| requests[].name | string | yes | |
| requests[].method | string | yes | |
| requests[].endpoint | string | yes | |
| requests[].sourceId | string | null | no | |
| requests[].body | record of any JSON | no | |
| requests[].contract | record of string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| config | object | null | yes |
Try it
yarn splash apiConfig.update '{"headers":[],"sources":[],"requests":[{"id":"feed","name":"Feed","method":"GET","endpoint":"/feed"}]}' --dry-runGenerated from the operation registry and the MCP tool catalogue (source 1c29a2af0f260170).
Something wrong on this page? Write to docs@librettocms.com.