Skip to content

[WIP] 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
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
},
"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
}