Create Dataset Ingestion Task
POSThttps://api.confident-ai.com/v1/datasets/{alias}/dataset-ingestion-tasks
Creates a standing rule that harvests matching production traces, spans, or threads into the dataset as goldens, starting immediately unless enabled is false.
dataModel must match the dataset: a multi-turn dataset only accepts THREAD tasks, and a single-turn dataset only accepts TRACE or SPAN. Requires the Starter plan or above.
curl -X POST "https://api.confident-ai.com/v1/datasets/{alias}/dataset-ingestion-tasks" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Harvest failed checkouts",
"dataModel": "TRACE",
"sampleRate": 0.1,
"maxGoldens": 500,
"includeInput": true,
"includeActualOutput": true
}'{
"success": true,
"data": {
"id": "INGESTION-TASK-ID"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows"
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aliasstringRequiredThe unique alias of the dataset to harvest into.
Request body
descriptionstringA note about what the task harvests.
enabledbooleanWhether the task runs. Disabling it unschedules the job; goldens already created are kept.
sampleRatenumberThe fraction of matching items to ingest. Defaults to 1 (all of them).
filtersobjectA set of filter groups combined by a top-level operator.
Show 2 propertiesHide 2 properties
operatorenumRequiredHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
groupslist of objectsRequiredThe filter groups.
Show 2 propertiesHide 2 properties
operatorenumRequiredHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
filterslist of objectsRequiredThe filter rows in this group.
Show 4 propertiesHide 4 properties
categorystringRequiredThe property a filter row matches on (e.g. "Name", "User Id", "Model", "Metadata"). The set of valid values depends on the line's dataModel.
conditionenumRequiredThe comparison a filter row applies. Valid conditions depend on the category.
Show 18 enum valuesHide 18 enum values
IsIs notIs equal toDoes not equalIs less thanIs equal or less thanIs greater thanIs equal or greater thanHasHas notContainsContains onlyDoes not containHas increased by more thanHas increased by less thanHas decreased by more thanHas decreased by less thanHas changed from
valuestring | number | list of stringsRequiredThe value to match against.
Show 3 variantsHide 3 variants
string
- OR
number
- OR
list of strings
keystringThe property key. Auto-populated from category when omitted; required for Metadata, Metric, and Classifier filters.
maxGoldensintegerThe maximum number of goldens this task will ever create. Send
nullto remove the cap.inputTransformerIdstringA transformer that reshapes the harvested input before it is stored. Send
nullto detach it.outputTransformerIdstringA transformer that reshapes the harvested output before it is stored. Send
nullto detach it.includeInputbooleanPopulate the golden's
inputfrom the harvested item. Defaults to true; every other include flag defaults to false.includeActualOutputbooleanPopulate the golden's
actualOutput.includeExpectedOutputbooleanPopulate the golden's
expectedOutput.includeRetrievalContextbooleanPopulate the golden's
retrievalContext.includeContextbooleanPopulate the golden's
context.includeToolsCalledbooleanPopulate the golden's
toolsCalled.includeExpectedToolsbooleanPopulate the golden's
expectedTools.namestringRequiredA name for the task, unique within the dataset.
dataModelenumRequiredWhat kind of item to harvest. Must match the dataset —
THREADfor multi-turn datasets,TRACEorSPANfor single-turn ones.Show 3 enum valuesHide 3 enum values
TRACESPANTHREAD
Response
successbooleanIndicates if the ingestion task was successfully created.
dataobjectShow 1 propertyHide 1 property
idstringThe unique identifier of the created ingestion task.
linkstringA link to the workflows page.