Appearance
Add Process Task API
API Information
- Request Path:
/processtask/addTask - Request Method:
POST - Content-Type:
application/json
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | User authentication token |
| Content-Type | String | Yes | Must be set to application/json |
Request Parameters
| Parameter | Type | Required | Description | Constraints |
|---|---|---|---|---|
| ProcessTaskAddReq | Object | Yes | Process task creation request | Contains task parameters and configuration |
ProcessTaskAddReq Object
| Parameter | Type | Required | Description | Constraints |
|---|---|---|---|---|
| taskType | Integer | Yes | Task Type, 1-Imagery Fusion, 2-Imagery Mosaicking,3.Clip, 4-Cloud Removal, 6-Band Merging, 7-Index Calculation (NDVI), 8-Index Calculation (EVI), 9-Index Calculation (NDWI), 10-Index Calculation (NDBI), 11-Index Calculation (BAI) | not empty |
| taskName | String | Yes | Task Name | not empty |
| outputPath | Long | Yes | Output Folder Id in Data Storage | not empty |
| outputFileName | String | Yes | Output File Name in Data Storage | not empty |
| reflectanceMultiplier | Long | No | reflectance multiplier(only used in Index Calculation) | optional |
| reflectanceAddend | Long | No | reflectance addend(only used in Index Calculation) | optional |
| datas | List<ProcessTaskDataReq> | Yes | Data Inputs | not empty |
ProcessTaskDataReq Object
| Parameter | Type | Required | Description | Constraints |
|---|---|---|---|---|
| type | Integer | Yes | same as Task Type | not empty |
| dataFileId | Long | Yes | Data File Id | not empty |
| bandInfoId | List<Long> | No | band id(support one value at present) | not empty |
| aoiId | Long | No | aoi Mgt id | not empty |
| geoAoi | String | No | a valid WKT (Well-Known Text) representation of a geographic geometry | not empty |
Request Body Example
json
{
"taskType": 6,
"taskName": "API TEST BAND MERGING",
"outputPath": 706,
"outputFileName": "ApiTestBandMergingResult",
"reflectanceMultiplier": null,
"reflectanceAddend": null,
"datas": [
{
"dataFileId": 542,
"bandInfoId": [
11854
]
},
{
"dataFileId": 543,
"bandInfoId": [
12485
]
}
]
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | ProcessTaskAddResp | Process Task create information |
ProcessTaskAddResp Object
| Field | Type | Description |
|---|---|---|
| taskId | Long | Process Task ID |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"taskId": 18
}
}Failure Response
json
{
"code": 400,
"message": "Invalid task parameters",
"data": null
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 404 | Input files not found |
| 500 | Server internal error |
Usage Instructions
- This API is used to create a new general process task
- User authentication is required
- Task type and input files must be specified
- Returns boolean indicating task creation success
Notes
- Task name is required for identification
- Input file IDs must reference existing files
- Task type determines the processing algorithm
- Additional parameters depend on the task type
- User authentication token must be included in request headers