Appearance
Query Folder Tree API
API Information
- Request Path:
/datafile/folder/tree - Request Method:
GET - Content-Type:
application/json
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | User authentication token |
Request Parameters
No request parameters required.
Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | List<FolderTreeNode> | Folder tree structure |
FolderTreeNode Object (Nested in CommonResponse)
| Field | Type | Description |
|---|---|---|
| id | Long | Folder ID |
| name | String | Folder name |
| path | String | Folder path |
| parentId | Long | Parent folder ID |
| ctime | Long | Creation timestamp |
| children | List<FolderTreeNode> | List of child folders |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": [
{
"id": 1,
"name": "root",
"path": "/",
"parentId": null,
"ctime": 1704105600000,
"children": [
{
"id": 2,
"name": "satellite_data",
"path": "/satellite_data",
"parentId": 1,
"ctime": 1704105600000,
"children": [
{
"id": 3,
"name": "landsat",
"path": "/satellite_data/landsat",
"parentId": 2,
"ctime": 1704105600000,
"children": []
},
{
"id": 4,
"name": "sentinel",
"path": "/satellite_data/sentinel",
"parentId": 2,
"ctime": 1704105600000,
"children": []
}
]
},
{
"id": 5,
"name": "vector_data",
"path": "/vector_data",
"parentId": 1,
"ctime": 1704105600000,
"children": []
}
]
}
]
}Failure Response
json
{
"code": 401,
"message": "Unauthorized",
"data": null
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 401 | Unauthorized |
| 500 | Server internal error |
Usage Instructions
- This API is used to query the complete folder tree structure
- User authentication is required
- Returns hierarchical folder structure for the authenticated user
- No request parameters needed
Notes
- Returns the complete folder hierarchy for the user
- Useful for folder navigation and file management
- User authentication token must be included in request headers