Dataset Versions
Manage dataset versions so you can track the performance of and iterate on your datasets

Add a dataset version

cURL
1
curl --location -g --request POST 'api.clarifai.com/v2/datasets/{{dataset_id}}/versions' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"dataset_versions": [
6
{
7
"id": "dataset-version-1633032673",
8
"name": "foo",
9
"dataset_filter": {
10
"id": "{{dataset_filter_id}}"
11
}
12
}
13
]
14
}'
Copied!

List dataset versions

cURL
1
curl --location -g --request GET 'api.clarifai.com/v2/datasets/{{dataset_id}}/versions?page=1&per_page=100' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json'
Copied!

Get a dataset versions

cURL
1
curl --location -g --request GET 'api.clarifai.com/v2/datasets/{{dataset_id}}/versions/{{dataset_version_id}}' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json'
Copied!

Change a dataset version

cURL
1
curl --location -g --request PATCH 'api.clarifai.com/v2/datasets/{{dataset_id}}/versions' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"dataset_versions": [
6
{
7
"id": "{{dataset_version_id}}",
8
"name": "dataset version updated name"
9
}
10
],
11
"action": "overwrite"
12
}'
Copied!

Delete a dataset version

cURL
1
curl --location -g --request DELETE 'api.clarifai.com/v2/datasets/{{dataset_id}}/versions' \
2
--header 'Authorization: Key {{YOUR API KEY}}' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"dataset_version_ids": ["{{dataset_version_id}}"]
6
}'
Copied!
Last modified 1mo ago