CDN Pro
获取日志配置的详细信息。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*idInteger | 日志配置的id。 |
参数名称 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idInteger | 取值范围: >= 1
日志配置的ID。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
configsGetALogConfigurationResponseConfigs | 日志配置。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
descriptionString | 日志配置描述信息。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hostnamesList | 适用该日志配置的域名列表。每个域名必须是完整的FQDN域名如domain.com,或者是带星号的泛域名如*.domain.com。如果该日志配置适用于所有域名,则直接用星号*表示。每个域名有且只能有一个对应的日志配置。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadFormatString | 日志格式。可使用以下变量来自定义日志输出格式:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadStorageDaysInteger | 默认值: 14 取值范围: [ 1 .. 30 ]
日志保存天数。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadFileSpanMinutesInteger | 取值范围: 5,15,30,60,120,240,480,1440
默认值: 30
每几分钟生成日志文件。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lastUpdateTimeString | 日志配置最近一次更新时间,以RFC 3339日期格式展示。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
creationTimeString | 日志配置创建时间,以RFC 3339日期格式展示。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidLogConfigId | The specified log config ID does not exist or the caller doesn't have access to this resource. | 400 | 指定的日志配置ID不存在,或者您无访问权限。 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/cdn/report/logConfigs/{id}" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "id": 1, "configs": { "description": "my log configuration", "hostnames": [ "domain.com" ], "logDownloadFormat": "%cltip %rmtuser [%utctime] \"%method %url %protocol\" %statuscode %rspsize \"%referer\" \"%ua\" %rsptime", "logDownloadStorageDays": 14, "logDownloadFileSpanMinutes": 30 }, "creationTime": "2021-12-14T22:48:08Z", "lastUpdateTime": "2021-12-14T22:48:08Z" }