Appearance
Query AOI Page API
API Information
- Request Path:
/aoi/query/page - 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
AoiListReq Object
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| page | Integer | Yes | Page number | Must be positive integer |
| size | Integer | Yes | Page size | Must be positive integer |
| userId | String | No | User ID filter | Optional user filter |
| name | String | No | AOI name filter | Optional name filter |
Request Body Example
json
{
"page": 1,
"size": 10,
"userId": "user123",
"name": "Beijing"
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | AoiResp | AOI list response |
AoiResp Object
| Field | Type | Description |
|---|---|---|
| total | Long | Total number of records |
| pages | Integer | Total number of pages |
| aoiList | List<AoiVo> | List of AOI records |
AoiVo Object (Nested in AoiResp)
| Field | Type | Description |
|---|---|---|
| id | Long | AOI ID |
| name | String | AOI name |
| geoAoi | String | Geometry in WKT format |
| area | String | Area value |
| lngLat | String | Longitude and latitude coordinates |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"total": 25,
"pages": 3,
"aoiList": [
{
"id": 1,
"name": "Beijing Urban Area",
"geoAoi": "POLYGON((116.0 39.0, 117.0 39.0, 117.0 40.0, 116.0 40.0, 116.0 39.0))",
"area": "16410.54",
"lngLat": "116.5,39.5"
}
]
}
}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 Area of Interest (AOI) list with pagination
- User authentication is required
- Supports filtering by AOI name and sorting
- 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
- Users can only see their own AOIs