文档
测试

获取7天预报列表

POST
https://www.xm12379.com/apis/forecast/7day/list

接口描述

获取最新的7天预报文档列表

请求头

参数名
类型
描述
必填
apikey
string
您的授权密钥
必填
content-type
string
示例:application/json
必填

请求参数

参数名
类型
描述
必填
id
string
必须为 文档a-7天预报列表
必填
params
object
数据字典
必填
from
int
示例:0
可选
size
int
示例:10
可选

响应参数

参数名
类型
描述
必填
took
int
示例:1
必填
timed_out
boolean
示例:false
必填
_shards
object
数据字典
必填
total
int
示例:5
必填
successful
int
示例:5
必填
skipped
int
示例:0
必填
failed
int
示例:0
必填
hits
object
数据字典
必填
total
int
示例:16
必填
max_score
object
示例:null
必填
hits
array
数据列表
必填
_index
string
示例:fc_file_object_idx
必填
_type
string
示例:_doc
必填
_id
string
示例:623744592
必填
_score
object
示例:null
必填
_source
object
数据字典
必填
id
string
示例:623744592
必填
name
string
示例:20211113
必填
groupId
string
示例:-1893036601
必填
size
int
示例:503
必填
extension
string
示例:txt
必填
uri
string
示例:local:/home/ms-file-center/forecast_weather_7day/20211113.txt
必填
uploadAt
string
示例:2021-11-14 09:01:01
必填
sort
array
数据列表
必填

说明 / 示例

## 请求头说明 id必须为 文档a-7天预报列表 ## 返回结果下载文件说明 下载文件使用文件下载接口,其中的文件id参数为本结果中返回的id,如本接口返回结果如下: ```json { "took": 1, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 16, "max_score": null, "hits": [ { "_index": "fc_file_object_idx", "_type": "_doc", "_id": "623744592", "_score": null, "_source": { "id": "623744592", "name": "20211113", "groupId": "-1893036601", "size": 503, "extension": "txt", "uri": "local:/home/ms-file-center/forecast_weather_7day/20211113.txt", "uploadAt": "2021-11-14 09:01:01" }, "sort": [1636880461000] } ] } } ``` 路径 ```hits.hits[n]._source.id```即为下载文件所需要使用的id。