Reports
Retrieve Report Files
Description
Retrievell all report files
Request Config
| Config | Definition |
|---|---|
| URL | /report/file?partition_by=day&partition_start=20250218&partition_end=20250218&type=store-daily-report |
| Method | GET |
Param
| Name | Type | Description | Required |
|---|---|---|---|
| partition_by | string | Report cycle partition type: day: day week:weekmonth:monthquarter:quarteryear:year | Yes |
| partition_start | int64 | Report cycle partition start,Refer [Report Cycle Partition](#Report Cycle Partition) section | Yes |
| partition_end | int64 | Report cycle partition end,Refer [Report Cycle Partition](#Report Cycle Partition) section | Yes |
| type | string | Report type | No |
Notice: The API supports returning a maximum of 2000 data entries. If it exceeds 2000 entries, please shorten the report cycle partition range.
Report Cycle Partition
The report cycle partition format varies depending on the report cycle partition type defined by "partition_by." The specific supported formats are as shown in the table below:
| Report cycle partition type | Report cycle partition format | Sample | Note |
|---|---|---|---|
| day | yyyyMMdd | 20250218 | |
| week | yyyyww | 202550 | 01 - 52week |
| month | yyyyMM | 202502 | 01 - 12montth |
| quarter | yyyyq | 20251 | 1 - 4quarter |
| year | yyyy | 2025 |
Response
Schema of data
| Name | Type | Description |
|---|---|---|
| results | []object | result objects |
| + id | int64 | report id |
| + type | string | report type |
| + partition_by | string | report cycle partition type |
| + partition | int64 | report cycle partition,maybe some day or some month |
| + url | string | report file url |
| + md5 | string | md5 value of report file url |
| + update_time | int64 | report update time(in ms) |
Notice: When the report data is updated, the latest report file link will be returned. Please note whether the report file's MD5 value or update_time has changed. If there is a change, please download it again.
Response Body Sample
json
{
"code": 0,
"message": "",
"data": {
"results": [
{
"id": 1,
"type": "store-daily-report",
"partition_by": "day",
"partition": 20250218,
"url": "https://f-dev.clobotics.cn/4/0040ca4d85f5e5ef7354102f486ef877.csv",
"md5": "15e2bbd5a19437ffe3b29e5661ed36aa",
"update_time": 1668478888000
}
]
}
}Retrieve Report Config
Description
Retrieve the report configuration
Request Config
| Config | Definition |
|---|---|
| URL | /report/config |
| Method | GET |
Response
Schema of data
| Name | Type | Description |
|---|---|---|
| results | []object | results objects |
| + type | string | report type |
| + name | string | report name |
| + partition_by | string | report cycle partition typeday:dayweek:weekmonth:monthquarter:quarteryear:year |
| + output | string | output type:file: return the report file link; |
Response Body Sample
json
{
"code": 0,
"message": "",
"data": {
"results": [
{
"type": "store-daily-report",
"name": "Store daily report",
"partition_by": "day",
"output": "file"
}
]
}
}