Appearance
Query Data File Page API
API Information
- Request Path:
/datafile/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
QueryDataFiles Object
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| parentId | Long | No | Parent directory ID, root use -1, if value is null, system will search all data | directory filter |
| page | Integer | Yes | Page number | Must be positive integer |
| size | Integer | Yes | Page size | Must be positive integer |
| fileName | String | No | File name filter | Optional name filter |
| geometry | Long | No | wkt format polygon | Optional geometry filter |
Request Body Example
json
{
"page": 1,
"size": 10,
"fileName": "satellite",
"parentId": -1,
"geometry": "POLYGON ((54.32011 24.452572, 54.329834 24.452572, 54.329834 24.459919, 54.32011 24.459919, 54.32011 24.452572))"
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | DataFileResp | Data file list response |
DataFileResp Object
| Field | Type | Description |
|---|---|---|
| total | Long | Total number of records |
| pages | Integer | Total number of pages |
| fileVoList | List<DataFileVo> | List of data file records |
DataFileVo Object (Nested in DataFileResp)
| Field | Type | Description |
|---|---|---|
| id | Long | File ID |
| dataType | Integer | Data type (0-satellite image file) |
| imageId | String | Image unique identifier |
| fileExtension | String | File format (tif, tiff, gltf, obj, etc.) |
| size | Double | File size in GB |
| fileName | String | File/folder name |
| dirPath | String | File/folder logical storage path |
| parentId | Long | Parent folder ID |
| folder | Integer | Is folder (0-file, 1-folder) |
| captureTime | Long | Capture timestamp |
| updateTime | Long | Update timestamp |
| category | Integer | File category |
| userName | String | User name |
| avatar | String | User avatar |
| creator | String | Creator name |
| thumbnailUrl | String | Thumbnail URL |
| bandInfos | List<SpectralBandInfo> | Spectral band information |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"total": 50,
"pages": 5,
"fileVoList": [
{
"id": 1,
"dataType": 0,
"imageId": "IMG_001",
"fileExtension": ".tif",
"size": 1.024,
"fileName": "satellite_image_001.tif",
"dirPath": "/data/satellite",
"parentId": 12345,
"folder": 0,
"captureTime": 1704105600000,
"updateTime": 1704105600000,
"category": 1,
"userName": "admin",
"avatar": "/avatars/admin.jpg",
"creator": "admin",
"thumbnailUrl": "/thumbnails/satellite_image_001.jpg"
}
]
}
}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 data file list with pagination (user's own data)
- User authentication is required
- Supports filtering by file name, extension, parent directory, and data type
- 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
- Demo users can only see their own files