curl --request POST \
--url https://api.promptlayer.com/api/public/v2/dataset-versions/create-draft \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"dataset_group_id": 123
}
'{
"success": true,
"message": "Draft dataset version created",
"draft_dataset_id": 789
}Datasets API
Create Draft Dataset Version
POST
/
api
/
public
/
v2
/
dataset-versions
/
create-draft
curl --request POST \
--url https://api.promptlayer.com/api/public/v2/dataset-versions/create-draft \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"dataset_group_id": 123
}
'{
"success": true,
"message": "Draft dataset version created",
"draft_dataset_id": 789
}Legacy Dataset, Evaluation, and Report endpoints are deprecated for new workflows. Use the Tables API for new dataset import, evaluation, scoring, recalculation, and reporting workflows.
version_number = -1 until they are saved as a published version.
Behavior Notes
- Only one draft can exist per dataset group at a time; creating another draft returns
409. - Without
source_dataset_id, PromptLayer creates an empty draft and returns201. - With
source_dataset_id, rows are copied from the source dataset asynchronously and the endpoint returns202. - The source dataset must belong to the same dataset group.
Related
Body
application/json
Was this page helpful?

