api.command
The api.command: command interacts with APIs to perform various actions that were previously impossible from automation code (e.g. creating explorer sets, pre-signing AWS URLs, reading worker preferences, validating OAuth2 tokens).
Each API command has a name:
and an optional set of params:
.
New API commands can be added using the plugin system.
start:
api.command:
inputs:
name: cerb.commands.worklist.explorer.create
params:
interaction: cerb:automation:wgm.explore.worklist
interaction_inputs:
worklist_id: cust_1
output: results
Syntax
inputs:
name:
The name of the API command to invoke.
URI | Description |
---|---|
cerb.commands.activity.log |
Create arbitrary activity log entries and send watcher notifications. |
cerb.commands.dataset.vector_similarity |
Load a JSONL dataset resource and find the most similar vectors to a query. |
cerb.commands.email.relay |
Relay a message to a list of external worker email addresses. |
cerb.commands.email.relay.sign |
Generate the signed Message-Id: header for an outgoing worker relay message. |
cerb.commands.email.spam.train |
Train ticket content as spam. |
cerb.commands.oauth2.token.validate |
Validates an OAuth2 token generated by Cerb. |
cerb.commands.worklist.explorer.create |
Create a dynamic explore set. |
cerb.commands.worklist.search |
Return the personalized worklist configuration and search results for a given worklist and worker. |
params:
The parameters depend on the selected command.
output:
Save the results in this placeholder.
The results depend on the selected command.
on_simulate:
The commands to run during simulation instead of the API command.
If omitted, the API command is invoked during simulation.
on_success:
The commands to run on success.
The output:
placeholder receives a dictionary based on the API command.
on_error:
The commands to run on failure. If omitted, the automation exits in the error
state.
The output:
placeholder receives a dictionary with these keys:
Key | |
---|---|
error |
The error message. |