Skip to content

Create Workflow

POSThttps://portal-prod.rosettalab.top/rosetta-open/workflow/create

This page will help you get started with creating a specific workflow for annotation request, you can create multiple workflows in one project for different annotation targets, the structure refer to Workflow config.

body params

*projectIdlong
Project id returned by Create Project
*workflowobject
Workflow of the annotation pipeline, which is composed of a set of pools, you can edit it later on the web platform, refer to Workflow Samples. If not set, the platform will give the project a default config.
*vertexobject[]
Set of pools, the type of the first pool must be 0, means distribution pool, and the type of the last pool must be 5, means completion pool.
*namestring
Name of the pool
*runModeinteger
Running mode of the pool: 0 represents manually, 1 represents automatically.
*typeinteger
Type of the pool, 0 represents distribution, 1 represents labeling, 2 represents inspection, 3 represents spot check, 4 represents algorithm (Now we primarily support 3D pre-labeling, and plan to introduce more flexible configurations in the future), 5 represents completion.
*workersstring[]
Name list of accounts assigned to the pool, which is used in labeling pool, inspection pool, spot check pool.
Examples
shell
curl https://portal-prod.rosettalab.top/rosetta-open/workflow/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>"

responses

200
{
"code": 200,
"message": "Succeed",
"data": {
"workflowId": 18000
},
"date": "2024-05-17 17:22:21",
"requestId": "c597b2ac171593779390810011afb4",
"success": true
}
400
{
"code": 400,
"data": null,
"date": "2024-05-17 17:22:21",
"message": "Invalid Parameter",
"requestId": "c597b2ac171593779390810011afb4",
"success": false
}

Workflow config

json
{
  "vertex": [
    {
      "name": "Distribution pool",
      "runMode": 0,
      "type": 0
    },
    {
      "name": "Algorithm pool",
      "runMode": 1,
      "type": 4
    },
    {
      "name": "Labeling pool",
      "type": 1,
      "workers": [],
      "disableOperationItem": []
    },
    {
      "name": "Inspection pool",
      "type": 2,
      "workers": [],
      "disableOperationItem": []
    },
    {
      "name": "Spot check pool",
      "type": 3,
      "workers": []
    },
    {
      "name": "Completion pool",
      "type": 5
    }
  ]
}
json
{
  "vertex": [
    {
      "name": "Distribution pool",
      "runMode": 0,
      "type": 0
    },
    {
      "name": "Labeling pool",
      "type": 1,
      "workers": [],
      "disableOperationItem": []
    },
    {
      "name": "Inspection pool",
      "type": 2,
      "workers": [],
      "disableOperationItem": []
    },
    {
      "name": "Completion pool",
      "type": 5
    }
  ]
}