Skip to content

Create Sampling Package

POSThttps://${domain}/rosetta-open/sampling/create

We will provide a POST API for create a sampling package.

body params

*annotationRequestIdstring Defaults to a3f8b6e4-9c1d-4d8a-93b2-7f7e8f3a1d5e
Helix Annotation Request Id
*poolNamestring Defaults to a3f8b6e4-9c1d-4d8a-93b2-7f7e8f3a1d5e-SamplingPool
Rosetta Pool Name
sampleTypenumber Defaults to 1
Sampling type value, Please see the enumeration values defined below.
ValueDescription
1Sequential sampling
2Random sampling
sampleCountnumber Defaults to 1
Sampling count, If you do not fill it in, all tasks in the pool will default
samplingRationumber Defaults to 1.0
Sampling ratio(Choose one of sampleRatio and samplingQuantity)
samplingQuantitynumber Defaults to 1
Sampling quantity(Choose one of sampleRatio and samplingQuantity),If you do not fill it in, all tasks in the pool will default
subConditionobject
Advanced screening conditions
conditionJoinTypestring
Set the logical operation relationship between all conditions (and/or)
workPoolFilterTypenumber
Filter tasks by last work pools they passed through or all work pools they passed through historically
ValueDescription
1Last work pool
2Historical work pool
workPoolFilterarray[string]
Pool Name list, enter together with workPoolFilterType.
userNameFilterarray[string]
List of usernames of users who have processed the task you want to filter by
operationFilterTypearray[number]
Operation type performed by the user on tasks.Enter together with userNameFilter.
ValueDescription
1Annotation
2Review
3Sampling
noNeedAnnotateboolean
Filter out tasks that need to be annotated or not by selecting whether there are annotation results in tasks.
ValueDescription
trueneed annotate
falsenot need annotate
haveIssueboolean
Filter tasks by selecting whether they have error labels.
ValueDescription
trueneed issue
falsenot need issue
rejectionTimenumber
Filter tasks by the number of times they have been rejected.
taskIdarray[string]
Rosetta task id list
startTimestring
Filter tasks by limiting the time range in which tasks enter the current sampling pool. This parameter sets the start time.
endTimestring
Filter tasks by limiting the time range in which tasks enter the current sampling pool. This parameter sets the end time.
interceptionModenumber Defaults to 1
Interception method value, Please see the enumeration values defined below. They are not intercepted by default
ValueDescription
1random continuity
2positive
3reversed
4system random
5custom
6sequencelength
interceptionFramenumber Defaults to 1
Required when your interceptionMode parameter is not sequencelength.
sequenceLengthnumber Defaults to 1
Required when your interceptionMode selects sequencelength.
interceptionBoundaryarray[object] Defaults to 1
Required when your interceptionMode type is custom.
*startnumber Defaults to 1
Start position
*endnumber Defaults to 2
End position
Examples
shell
curl https://${domain}/rosetta-open/sampling/create \
 -X POST \
 -H 'Content-Type: application/json' \
 -H 'X-STARDUST-KEY: <X-STARDUST-KEY>' \
 -H 'X-TS: <X-TS>' \
 -H 'X-SIGN: <X-SIGN>' \
 -d '{"annotationRequestId":"a3f8b6e4-9c1d-4d8a-93b2-7f7e8f3a1d5e","poolName":"a3f8b6e4-9c1d-4d8a-93b2-7f7e8f3a1d5e-SamplingPool","sampleType":"1","sampleCount":"1","samplingRatio":"1.0","samplingQuantity":"1","interceptionMode":"1","interceptionFrame":"1","sequenceLength":"1","interceptionBoundary":"1"}'

responses

2000
{
"code": 2000,
"message": "Success",
"data": {
"samplingPackageId": 5888,
"sceneIdList": [...]
},
"date": "2025-03-13 20:00:00",
"requestId": "7610aa38c0fc409d98c827a879d9cae5",
"success": true
}
5606
{
"code": 5606,
"data": null,
"message": "The remaining tasks in the current working pool are 0 and cannot be assigned",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
53003
{
"code": 53003,
"data": null,
"message": "Annotation request has not exists.",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
55005
{
"code": 55005,
"data": null,
"message": "Pool not found",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
57008
{
"code": 57008,
"data": null,
"message": "Sampling Package not found.",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
57015
{
"code": 57015,
"data": null,
"message": "Choose one of sampleRatio and samplingQuantity",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}