Appearance
Query Algorithm Page API
API Information
- Request Path:
/analysis/algorithm/page/query - 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
AnalysisAlgorithmQuery Object
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| page | Integer | Yes | Page number | Must be positive integer |
| size | Integer | Yes | Page size | Must be positive integer |
| nameOrAlgorithmCode | String | No | Algorithm name or code filter | Optional fuzzy search |
| type | String | No | Algorithm category filter | Optional category filter |
| sort | String | No | Sort field | Optional, defaults to "ctime" |
| order | String | No | Sort order | Optional, defaults to "desc" |
Request Body Example
json
{
"page": 1,
"size": 10,
"nameOrAlgorithmCode": "NDVI",
"type": "vegetation",
"sort": "ctime",
"order": "desc"
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | AnalysisAlgorithmResp | Algorithm list response |
AnalysisAlgorithmResp Object
| Field | Type | Description |
|---|---|---|
| total | Long | Total number of records |
| pages | Integer | Total number of pages |
| algorithmVOList | List<AnalysisAlgorithmVO> | List of algorithm records |
AnalysisAlgorithmVO Object (Nested in AnalysisAlgorithmResp)
| Field | Type | Description |
|---|---|---|
| name | String | Algorithm name |
| type | String | Algorithm category |
| description | String | Algorithm description |
| algorithmCode | String | Algorithm code |
| algorithmType | String | Algorithm type |
| icon | String | Algorithm icon URL |
| enable | Integer | Enable status (0-disabled, 1-enabled) |
| ctime | Long | Creation timestamp |
| mtime | Long | Modification timestamp |
| creator | String | Creator name |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"total": 25,
"pages": 3,
"algorithmVOList": [
{
"name": "NDVI Calculation",
"type": "vegetation",
"description": "Calculate Normalized Difference Vegetation Index",
"algorithmCode": "NDVI_CALCULATION",
"algorithmType": "index",
"icon": "https://example.com/icons/ndvi.png",
"enable": 1,
"ctime": 1704105600000,
"mtime": 1704105600000,
"creator": "admin"
},
{
"name": "Custom NDVI Calculation",
"type": "vegetation",
"description": "Custom implementation of NDVI calculation",
"algorithmCode": "CUSTOM_NDVI",
"algorithmType": "index",
"icon": "https://example.com/icons/custom_ndvi.png",
"enable": 1,
"ctime": 1704109200000,
"mtime": 1704109200000,
"creator": "admin"
}
]
}
}Failure Response
json
{
"code": 400,
"message": "Invalid request parameters",
"data": null
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 500 | Server internal error |
Usage Instructions
- This API is used to query algorithm list with pagination
- User authentication is required
- Supports filtering by algorithm name, data type, and enabled status
- Returns paginated results with total count
Notes
- User authentication token must be included in request headers
- Request body must be valid JSON format
- Pagination parameters are required
- Filtering parameters are optional