Update an action
const url = 'http://localhost:11044/api/v1/actions/spec/example';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"description":"example","inputTypeNames":["example"],"llmModel":"example","llmTemperature":1,"outputTypeName":"example","prompt":"example","references":["example"],"tools":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/actions/spec/example \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "description": "example", "inputTypeNames": [ "example" ], "llmModel": "example", "llmTemperature": 1, "outputTypeName": "example", "prompt": "example", "references": [ "example" ], "tools": [ "example" ] }'Updates a PromptedActionSpec in the world. Only actions in the world’s config/actions directory (not realm-shipped ones) can be edited.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Name of the action to edit, matched exactly against the world’s loaded actions (404 if none). It must be a prompted action whose YAML is at config/actions/<name>.yml in this world; a realm-shipped or non-prompted action is refused with 400
Request Bodyrequired
Section titled “Request Bodyrequired”Fields to change on the action; each one omitted or null keeps its current value, and a list given replaces the existing list. The merged spec is written back to the world’s YAML and the world reloads in the background, so the change may not be live when the response arrives
The body of POST /actions/spec/{name}: changes to a prompted action saved in the world’s config/actions directory. A field left out or null keeps its current value.
object
Replacement description of what the action does
Input type names replacing the whole current set
Replacement model name the action runs on
Replacement sampling temperature the action runs at
Replacement output type name
Replacement Jinja2 prompt template the action runs
Skill, reference-document or memory names replacing the whole current list
Tool names replacing the whole current list
Example generated
{ "description": "example", "inputTypeNames": [ "example" ], "llmModel": "example", "llmTemperature": 1, "outputTypeName": "example", "prompt": "example", "references": [ "example" ], "tools": [ "example" ]}Responses
Section titled “Responses”Action updated
object
Action is not editable
A refused action operation: not found, not editable, not deletable, or a compilation that failed
object
Why, written to be shown, naming the action
Always error
Action not found
A refused action operation: not found, not editable, not deletable, or a compilation that failed
object
Why, written to be shown, naming the action
Always error

