CDN Pro
获取预取请求的详细信息。
单用户调用频率:300/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*idString | 预取请求的 id。 |
参数名称 | 描述 |
---|---|
nameString | 取值范围: <= 1000 字符
预取请求的简短描述。 |
fileListList | |
urlString | 取值范围: [ 10 .. 2048 ] 字符
预取的URL。必须以'http'或'https'开头,长度不超过2048个字符。 |
headersList | 如果需要在缓存键中加入请求头,可用该字段指定请求头。 |
nameString | HTTP头部名称。 |
valueString | HTTP头部值。 |
metadataObject | 预取请求的状态信息。 |
idString | 预取请求ID。 |
submissionTimeString | RFC 3339格式的日期,表示预取请求的提交时间。 |
successRateInteger | 取值范围: [ 0 .. 100 ]
预取任务的成功率。 |
statusString | 取值范围: waiting,inprogress,finished
预取请求的任务执行状态,包括等待中,进行中,已完成等状态。 |
finishTimeString | RFC 3339格式的日期,表示预取完成的时间。 |
apiRequestIdString | API请求ID。 |
regionsList | 需要预取内容的大洲,以大洲英文名表示。未指定时表示预取内容到所有大洲的服务器。 |
startTimeString | RFC 3339格式的日期,表示开始预取的时间。必须使用UTC时间,例如'2021-03-06T00:00:00Z'。 |
webhookString | 预取任务完成时调用的webhook ID。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidPrefetchTaskId | The specified prefetch task ID does not exist. | 404 | 指定的预取请求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/prefetches/{id}" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "name": "my new prefetch request", "fileList": [ { "url": "http://example.com" }, { "url": "http://example.com/abc", "headers": [ { "name": "MyheaderName", "value": "123" } ] } ], "regions": [ "Asia" ], "startTime": "2021-03-06T00:00:00Z", "metaData": { "id": "4f8553f7f30942fd8a2d247f05db3602", "submissionTime": "2021-03-05T00:34:28Z", "successRate": 0, "status": "waiting", "apiRequestId": "889c2c5a2d9d93ce" } }