Skip to content

Query Algorithm Page API

API Information

  • Request Path: /analysis/algorithm/page/query
  • Request Method: POST
  • Content-Type: application/json

Request Headers

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

Request Body Structure

AnalysisAlgorithmQuery Object

FieldTypeRequiredDescriptionConstraints
pageIntegerYesPage numberMust be positive integer
sizeIntegerYesPage sizeMust be positive integer
nameOrAlgorithmCodeStringNoAlgorithm name or code filterOptional fuzzy search
typeStringNoAlgorithm category filterOptional category filter
sortStringNoSort fieldOptional, defaults to "ctime"
orderStringNoSort orderOptional, defaults to "desc"

Request Body Example

json
{
  "page": 1,
  "size": 10,
  "nameOrAlgorithmCode": "NDVI",
  "type": "vegetation",
  "sort": "ctime",
  "order": "desc"
}

Response Body Structure

CommonResponse Object

FieldTypeDescription
codeIntegerResponse status code
messageStringResponse message
dataAnalysisAlgorithmRespAlgorithm list response

AnalysisAlgorithmResp Object

FieldTypeDescription
totalLongTotal number of records
pagesIntegerTotal number of pages
algorithmVOListList<AnalysisAlgorithmVO>List of algorithm records

AnalysisAlgorithmVO Object (Nested in AnalysisAlgorithmResp)

FieldTypeDescription
nameStringAlgorithm name
typeStringAlgorithm category
descriptionStringAlgorithm description
algorithmCodeStringAlgorithm code
algorithmTypeStringAlgorithm type
iconStringAlgorithm icon URL
enableIntegerEnable status (0-disabled, 1-enabled)
ctimeLongCreation timestamp
mtimeLongModification timestamp
creatorStringCreator 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 CodeDescription
200Success
400Request parameter error
401Unauthorized
500Server internal error

Usage Instructions

  1. This API is used to query algorithm list with pagination
  2. User authentication is required
  3. Supports filtering by algorithm name, data type, and enabled status
  4. 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