Skip to content

Add Process Task API

API Information

  • Request Path: /processtask/addTask
  • Request Method: POST
  • Content-Type: application/json

Request Headers

ParameterTypeRequiredDescription
AuthorizationStringYesUser authentication token
Content-TypeStringYesMust be set to application/json

Request Parameters

ParameterTypeRequiredDescriptionConstraints
ProcessTaskAddReqObjectYesProcess task creation requestContains task parameters and configuration

ProcessTaskAddReq Object

ParameterTypeRequiredDescriptionConstraints
taskTypeIntegerYesTask 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
taskNameStringYesTask Namenot empty
outputPathLongYesOutput Folder Id in Data Storagenot empty
outputFileNameStringYesOutput File Name in Data Storagenot empty
reflectanceMultiplierLongNoreflectance multiplier(only used in Index Calculation)optional
reflectanceAddendLongNoreflectance addend(only used in Index Calculation)optional
datasList<ProcessTaskDataReq>YesData Inputsnot empty

ProcessTaskDataReq Object

ParameterTypeRequiredDescriptionConstraints
typeIntegerYessame as Task Typenot empty
dataFileIdLongYesData File Idnot empty
bandInfoIdList<Long>Noband id(support one value at present)not empty
aoiIdLongNoaoi Mgt idnot empty
geoAoiStringNoa valid WKT (Well-Known Text) representation of a geographic geometrynot 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

FieldTypeDescription
codeIntegerResponse status code
messageStringResponse message
dataProcessTaskAddRespProcess Task create information

ProcessTaskAddResp Object

FieldTypeDescription
taskIdLongProcess 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 CodeDescription
200Success
400Request parameter error
401Unauthorized
404Input files not found
500Server internal error

Usage Instructions

  1. This API is used to create a new general process task
  2. User authentication is required
  3. Task type and input files must be specified
  4. 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