Appearance
Create Analysis Task API
API Information
- Request Path:
/analysis/task/create - 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 Body Structure
CreatMetaDataAnalysisTaskReq Object
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| metaDataId | Long | Yes | Metadata ID | Must be valid metadata ID |
| taskName | String | Yes | Task name | Cannot be empty |
| algorithms | List<AnalysisTaskAlgorithmReq> | Yes | List of algorithm requests | Cannot be empty |
| shapeWkt | String | No | Fence data in WKT format | Optional WKT polygon |
| confidenceThreshold | Double | No | confidence threshold | Optional, default 0.2 |
| sliceWidth | Integer | No | tif image slice width | Optional, default 512 |
| sliceHeight | Integer | No | tif image slice height | Optional, default 512 |
AnalysisTaskAlgorithmReq Object (Nested in CreatMetaDataAnalysisTaskReq)
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| algorithm | String | Yes | Algorithm code | Cannot be empty |
| analyzeParam | Map<String, Object> | No | Analysis parameters | Optional 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
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | AnalysisTaskCreateResp | Analysis Task create information |
AnalysisTaskCreateResp Object
| Field | Type | Description |
|---|---|---|
| taskId | Long | Analysis 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 Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 404 | Algorithm not found |
| 500 | Server internal error |
Usage Instructions
- This API is used to create a new metadata analysis task
- User authentication is required
- Algorithm code and metadata IDs must be provided
- 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