List Prompt Actions
(v2)GET
Lists the prompt actions on the prompt, newest first. A prompt action runs an evaluation automatically when something happens to the prompt, such as a new commit.
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}/prompt-actions" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"promptActions": [
{
"id": "<PROMPT-ACTION-ID>",
"promptId": "<PROMPT-ID>",
"enabled": true,
"trigger": [
"COMMIT"
],
"evalTask": {
"id": "<EVAL-TASK-ID>",
"name": "Greeting regression",
"datasetId": "<DATASET-ID>",
"evaluatorCollectionId": "<EVALUATOR-COLLECTION-ID>",
"variableMapping": {
"name": "input"
}
},
"createdAt": "2025-01-18T16:45:00.000Z",
"updatedAt": "2025-01-20T09:12:00.000Z"
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
Response
List Prompt Actions succeeded.
successbooleanIndicates if the request was successful.
dataobjectThe prompt actions on a prompt.
Show 1 propertyHide 1 property
promptActionslist of objectsThis is the list of prompt actions on the prompt, newest first.
Show 7 propertiesHide 7 properties
idstringThis is the unique id of the prompt action.
promptIdstringThis is the id of the prompt the action belongs to.
enabledbooleanWhether the action runs when triggered.
triggerlist of enumsThese are the events that start the action.
Show 4 enum valuesHide 4 enum values
COMMITVERSIONMERGEPULL_REQUEST
evalTaskobjectThe evaluation a prompt action runs.
Show 5 propertiesHide 5 properties
idstringThis is the unique id of the evaluation.
namestringThis is the name of the evaluation, unique within your project.
datasetIdstring | nullThis is the id of the dataset the prompt is evaluated against, or
nullwhen none is set.evaluatorCollectionIdstring | nullThis is the id of the evaluator collection that scores the outputs, or
nullwhen none is set.variableMappingobject | nullThis maps each prompt variable to the dataset field that fills it, or is
nullwhen none is set.
createdAtstringWhen the action was created.
updatedAtstringWhen the action was last changed.
deprecatedbooleanIndicates if this endpoint is deprecated.