Skip to content

Create Analysis Task API

API Information

  • Request Path: /analysis/task/create
  • Request Method: POST
  • Content-Type: application/json

Request Headers

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

Request Body Structure

CreatMetaDataAnalysisTaskReq Object

FieldTypeRequiredDescriptionConstraints
metaDataIdLongYesMetadata IDMust be valid metadata ID
taskNameStringYesTask nameCannot be empty
algorithmsList<AnalysisTaskAlgorithmReq>YesList of algorithm requestsCannot be empty
shapeWktStringNoFence data in WKT formatOptional WKT polygon
confidenceThresholdDoubleNoconfidence thresholdOptional, default 0.2
sliceWidthIntegerNotif image slice widthOptional, default 512
sliceHeightIntegerNotif image slice heightOptional, default 512

AnalysisTaskAlgorithmReq Object (Nested in CreatMetaDataAnalysisTaskReq)

FieldTypeRequiredDescriptionConstraints
algorithmStringYesAlgorithm codeCannot be empty
analyzeParamMap<String, Object>NoAnalysis parametersOptional Key-value parameter map

Request Body Example

json
{
  "taskName": "Building Task",
  "shapeWkt": "POLYGON ((46.581 24.72, 46.584 24.72, 46.584 24.73, 46.581 24.73, 46.581 24.72))",
  "metaDataId": 549,
  "confidenceThreshold": 0.2,
  "sliceWidth": 512,
  "sliceHeight": 512,
  "algorithms": [
    {
      "algorithm": "neu_extract_building_segmentation"
    }
  ]
}

Response Body Structure

CommonResponse Object

FieldTypeDescription
codeIntegerResponse status code
messageStringResponse message
dataAnalysisTaskCreateRespAnalysis Task create information

AnalysisTaskCreateResp Object

FieldTypeDescription
taskIdLongAnalysis Task ID

Response Examples

Success Response

json
{
  "code": 200,
  "message": "success",
  "data": {
      "taskId": 18
  }
}

Failure Response

json
{
  "code": 400,
  "message": "Invalid algorithm code",
  "data": null
}

Error Code Description

Error CodeDescription
200Success
400Request parameter error
401Unauthorized
404Algorithm not found
500Server internal error

Usage Instructions

  1. This API is used to create a new metadata analysis task
  2. User authentication is required
  3. Algorithm code and metadata IDs must be provided
  4. Returns boolean indicating task creation success

Notes

  • Task name and algorithm code are required
  • Metadata IDs must reference existing metadata
  • Parameters depend on the specific algorithm
  • User authentication token must be included in request headers