POST
/v1/private/datasets/{dataset_id}/items/from-spansCreate dataset items from spansCreate dataset items from spans with enriched metadata
Parameters
dataset_idstring · uuidpathrequiredRequest body
application/json
objectCreateDatasetItemsFromSpansRequest
enrichment_optionsobjectrequiredOptions for enriching span data
Show child attributes
includeCommentsbooleanincludeFeedbackScoresbooleanincludeMetadatabooleanincludeTagsbooleanincludeUsagebooleanevaluatorsarray of objectOptional evaluators to apply to the created items
Show child attributes
Show array items
configobjectrequirednamestringrequiredtypestringrequiredexecution_policyobjectShow child attributes
pass_thresholdinteger · int32runs_per_iteminteger · int32field_mappingsobjectOptional mapping of dataset item field name to a path into the span, e.g. 'input.input_text'. Takes precedence over the fields produced by enrichment_options. Ignored for test suite datasets.
span_idsarray of string · uuidrequiredSet of span IDs to add to the dataset
Show child attributes
{
"enrichment_options": {
"includeComments": true,
"includeFeedbackScores": true,
"includeMetadata": true,
"includeTags": true,
"includeUsage": true
},
"evaluators": [
{
"config": {},
"name": "string",
"type": "code_metric"
}
],
"execution_policy": {
"pass_threshold": 0,
"runs_per_item": 0
},
"field_mappings": {
"additionalProp1": "string"
},
"span_ids": [
"00000000-0000-0000-0000-000000000000"
]
}