查询指定站点的原始访问日志的下载地址。
接口说明
当您不指定 StartTime 和 EndTime 时,默认读取过去 24 小时的日志数据;当指定 StartTime 和 EndTime 时,按指定的起止时间查询日志。
查询数据的时间粒度为一小时。
单用户调用频率:50 次/秒。
仅支持查询最近一个月的日志记录(开始时间和当前时间跨度不大于 31 天)。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:DescribeSiteLogs |
none |
*Site
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SiteId |
integer |
是 |
站点 ID,可以通过调用 ListSites 获取。 |
123456*** |
| PageSize |
integer |
否 |
分页大小,默认 300,最大 1000,取值:1~1000 之前的任意整数。 |
10 |
| PageNumber |
integer |
否 |
取得第几页,取值范围为大于 1 的任意整数。 |
1 |
| StartTime |
string |
否 |
获取日志起始时间点。 日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2022-11-06T16:00:00Z |
| EndTime |
string |
否 |
获取日志结束时间点。 日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 说明
说明 结束时间需大于起始时间。 |
2022-11-06T17:00:00Z |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
| SiteLogDetails |
array<object> |
站点日志信息组合。 |
|
|
array<object> |
|||
| SiteName |
string |
站点名称。 |
example.com |
| SiteId |
integer |
站点 ID。 |
123456*** |
| LogCount |
integer |
本页返回的总条数。 |
300 |
| LogInfos |
array<object> |
站点日志包信息。 |
|
|
object |
下载地址。 |
||
| LogSize |
integer |
日志大小,单位:字节。 |
438304768 |
| EndTime |
string |
结束时间。 |
2022-11-06T17:00:00Z |
| LogName |
string |
日志名称。 |
example.com_2022_11_07_000000_020000.gz.xxxxxx |
| LogPath |
string |
日志路径。 说明
需要关注返回参数 LogPath 中的字段 Expires(过期时间戳),过期后日志下载链接失效,需要重新获取。 |
example.aliyundoc.com /v1.l1cache/105252530/example.com/2022_11_07/example.com_2022_11_07_000000_020000.gz.xxxxxx?Expires=1636963354&OSSAccessKeyId=LTAIviCc6zy8****&Signature=u0V6foRfZniHE8i%2BHUdxGOhZsK**** |
| StartTime |
string |
开始时间。 |
2022-11-06T16:00:00Z |
| PageInfos |
object |
分页信息。 |
|
| PageSize |
integer |
分页大小,默认 300,取值:1~1000。 |
10 |
| TotalCount |
integer |
返回数据的总条数。 |
47 |
| PageIndex |
integer |
返回数据的页码。 |
1 |
示例
正常返回示例
JSON格式
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9",
"SiteLogDetails": [
{
"SiteName": "example.com",
"SiteId": 0,
"LogCount": 300,
"LogInfos": [
{
"LogSize": 438304768,
"EndTime": "2022-11-06T17:00:00Z\n",
"LogName": "example.com_2022_11_07_000000_020000.gz.xxxxxx",
"LogPath": "example.aliyundoc.com /v1.l1cache/105252530/example.com/2022_11_07/example.com_2022_11_07_000000_020000.gz.xxxxxx?Expires=1636963354&OSSAccessKeyId=LTAIviCc6zy8****&Signature=u0V6foRfZniHE8i%2BHUdxGOhZsK****\n",
"StartTime": "2022-11-06T16:00:00Z\n"
}
],
"PageInfos": {
"PageSize": 10,
"TotalCount": 47,
"PageIndex": 1
}
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | 您填入的结束时间早于开始时间,请检查后重试。 |
| 400 | InvalidStartTime.ValueNotSupported | The StartTime cannot exceed 31 days before the current time. | 请求参数StartTime不允许比当前时间小31天 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。