Skip to content

Query Tag Page API

API Information

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

Request Headers

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

Request Body Structure

TagListReq Object

FieldTypeRequiredDescriptionConstraints
pageIntegerYesPage numberMust be positive integer
sizeIntegerYesPage sizeMust be positive integer
tagNameStringNoTag name filterOptional name filter
sortFieldStringNoSort fieldOptional sort field
sortOrderStringNoSort orderOptional: "asc" or "desc"

Request Body Example

json
{
  "page": 1,
  "size": 10,
  "tagName": "satellite",
  "sortField": "createTime",
  "sortOrder": "desc"
}

Response Body Structure

CommonResponse Object

FieldTypeDescription
codeIntegerResponse status code
messageStringResponse message
dataTagRespTag list response

TagResp Object

FieldTypeDescription
totalIntegerTotal number of records
listList<TagVo>List of tag records

TagVo Object (Nested in TagResp)

FieldTypeDescription
idLongTag ID
tagNameStringTag name
descriptionStringTag description
usageCountIntegerUsage count
createTimeStringCreation timestamp
updateTimeStringUpdate timestamp
categoryIntegerTag category
colorStringHexadecimal color value
statusIntegerTag status

Response Examples

Success Response

json
{
  "code": 200,
  "message": "success",
  "data": {
    "total": 25,
    "list": [
      {
        "id": 1,
        "tagName": "satellite",
        "description": "Satellite imagery data",
        "usageCount": 15,
        "createTime": "2024-01-01T10:00:00Z",
        "updateTime": "2024-01-01T10:00:00Z",
        "category": 1,
        "color": "#FF5733",
        "status": 1
      },
      {
        "id": 2,
        "tagName": "vegetation",
        "description": "Vegetation analysis data",
        "usageCount": 8,
        "createTime": "2024-01-01T10:00:00Z",
        "updateTime": "2024-01-01T10:00:00Z",
        "category": 2,
        "color": "#33FF57",
        "status": 1
      }
    ]
  }
}

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 tag list with pagination
  2. User authentication is required
  3. Supports filtering by tag name and sorting
  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