Creating a Data Processing Task Version¶
Function¶
This API is used to create a data processing task version.
Debugging¶
You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.
URI¶
POST /v2/{project_id}/processor-tasks/{task_id}/versions
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name. |
task_id | Yes | String | ID of a data processing task. |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
create_version | No | Boolean | Whether to synchronously create a task version when creating a task. Options:
|
data_source | No | ProcessorDataSource object | Data source. Either this parameter or inputs is delivered. |
description | No | String | Description of a data processing task. The description contains 0 to 256 characters and does not support the following special characters: |
inputs | No | Array of ProcessorDataSource objects | Data source list. Either this parameter or data_source is delivered. |
name | Yes | String | Name of a data processing task. |
template | No | TemplateParam object | Data processing template, such as the algorithm ID and parameters. |
version_id | No | String | Dataset version ID. |
work_path | No | WorkPath object | Working directory of a data processing task. |
workspace_id | No | String | Workspace ID. If no workspace is created, the default value is 0. If a workspace is created and used, use the actual value. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | No | String | Dataset name. |
source | No | String | Data source path. Options:
|
type | No | String | Data source type. Options:
|
version_id | No | String | Version of a dataset. |
version_name | No | String | Dataset version name. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
id | No | String | Task type, which is the ID of a data processing template. Options:
|
name | No | String | Template name. |
operator_params | No | Array of OperatorParam objects | Operator parameter list. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
advanced_params_switch | No | Boolean | Advanced parameter switch. |
id | No | String | ID of an operator. |
name | No | String | Name of an operator. |
params | No | Object | Operator parameter. The parameter type is map<string,object>. Currently, object only supports the types of Boolean, Integer, Long, String, List[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] and Map<String,String>. For two special scenarios of object detection and image classification in a data preprocessing task, the value of task_type is object_detection or image_classification. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | No | String | Dataset name. |
output_path | No | String | Output path. |
path | No | String | Working path. Options:
|
type | No | String | Type of a working path. Options:
|
version_id | No | String | Version of a dataset. |
version_name | No | String | Name of a dataset version. The value can contain 0 to 32 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
version_id | String | Version ID of a data processing task. |
Example Requests¶
Creating a Data Validation Task Version
{
"name" : "PRE-e77c",
"inputs" : [ {
"type" : "DATASET",
"source" : "PYc9H2HGv5BJNwBGXyK",
"version_id" : "Osc8SZ7TZStiRV4vYkZ"
} ],
"work_path" : {
"type" : "DATASET",
"path" : "PYc9H2HGv5BJNwBGXyK",
"version_name" : "V0011"
},
"description" : "",
"template" : {
"id" : "sys_data_validation",
"operator_params" : [ {
"name" : "MetaValidation",
"advanced_params_switch" : false,
"params" : {
"task_type" : "image_classification",
"dataset_type" : "manifest",
"source_service" : "select",
"filter_func" : "data_validation_select",
"image_max_width" : "1920",
"image_max_height" : "1920",
"total_status" : "[0,1,2]"
}
} ]
},
"workspace_id" : "0"
}
Example Responses¶
Status code: 200
OK
{
"version_id" : "qSaudx2sbPvthHygckA"
}
Status Codes¶
Status Code | Description |
---|---|
200 | OK |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Error Codes¶
See Error Codes.