Adds a scheduled prefetch task.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InsertWay |
string |
Yes |
The method for uploading prefetch files. Valid values: textBox and oss. Valid values:
|
oss |
| Name |
string |
Yes |
The name of the scheduled prefetch task. |
example |
| OssUrl |
string |
No |
The URL of the OSS file that contains the URLs to prefetch. |
https://xxxobject.oss-cn-reginon.aliyuncs.com/9d91_xxxxxxxxxxx_158bb6e0f97c477791209bb46bd599f7 |
| SiteId |
integer |
Yes |
The site ID, which can be obtained by calling the ListSites operation. |
190007158391808 |
| UrlList |
string |
No |
The URLs to prefetch. Specify this parameter when you use the text box method to upload prefetch files. |
http://testurl.com/a.txt http://testurl.com/b.txt |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
15C66C7B-671A-4297-9187-2C4477247B78 |
| AliUid |
string |
The Alibaba Cloud account ID. |
15685865xxx14622 |
| CreatedAt |
string |
The time when the task was created, in ISO 8601 format. Example: 2024-01-01T00:00:00+08:00. |
2023-06-05T10:04:20+0800 |
| Domains |
string |
The prefetch domains. |
testurl.com |
| ErrorInfo |
string |
The error information. Multiple errors are separated by commas.
|
InvalidDomain |
| FailedFileOss |
string |
The OSS URL of the file that contains failed URLs. |
https://xxxobject.oss-cn-reginon.aliyuncs.com/9d91_xxxxxxxxxxx_158bb6e0f97c477791209bb46bd599f7 |
| FileId |
string |
The URL list file ID, which is used for downloading. |
665d3b48621bccf3fe29e1a7 |
| Id |
string |
The task ID. |
665d3af3621bccf3fe29e1a4 |
| InsertWay |
string |
The URL insertion method. Valid values:
|
oss |
| Name |
string |
The task name. |
example |
| SiteId |
integer |
The site ID. |
190007158391808 |
| TaskSubmitted |
integer |
The number of URLs that have been submitted for prefetch. |
1 |
| TaskType |
string |
The task type. Valid values:
|
preload |
| UrlCount |
integer |
The total number of URLs. |
2 |
| UrlSubmitted |
integer |
The number of submitted URLs. |
1 |
Examples
Success response
JSON format
{
"RequestId": "15C66C7B-671A-4297-9187-2C4477247B78",
"AliUid": "15685865xxx14622",
"CreatedAt": "2023-06-05T10:04:20+0800",
"Domains": "testurl.com",
"ErrorInfo": "InvalidDomain",
"FailedFileOss": "https://xxxobject.oss-cn-reginon.aliyuncs.com/9d91_xxxxxxxxxxx_158bb6e0f97c477791209bb46bd599f7",
"FileId": "665d3b48621bccf3fe29e1a7",
"Id": "665d3af3621bccf3fe29e1a4",
"InsertWay": "oss",
"Name": "example",
"SiteId": 190007158391808,
"TaskSubmitted": 1,
"TaskType": "preload",
"UrlCount": 2,
"UrlSubmitted": 1
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | The end time you entered is earlier than the start time. Please check and try again. |
| 400 | InvalidJob.JobCountOfSiteFull | The maximum number of prefetch tasks for the website has been reached. Delete some unwanted ones and try again. | The maximum number of prefetch tasks for the website has been reached. Delete some unwanted ones and try again. |
| 400 | InvalidParameter.ObjectId | Invalid task ID or execution plan ID. | Invalid task ID or execution plan ID. |
| 400 | MissingOssUrl | OssUrl missing. Specify a valid URL of the OSS object that stores URLs to prefetch. | OssUrl missing. Specify a valid URL of the OSS object that stores URLs to prefetch. |
| 400 | MissingUrlList | Enter the URLs you want to prefetch. | Enter the URLs you want to prefetch. |
| 400 | TooManyRequests | Too many requests.Please try again later. | Requests are too frequent, please try again later. |
| 403 | InvalidUid.PermissionDenied | You do not have the permissions to perform this operation on this resource. Check whether the specified UID is correct and has the required permissions. | You do not have the permissions to perform this operation on this resource. Check whether the specified UID is correct and has the required permissions. |
| 404 | InvalidJob.NotFound | The task does not exist. Check whether the task ID is correct or whether the task has been deleted. | The task does not exist. Check whether the task ID is correct or whether the task has been deleted. |
| 404 | LogNotFound | Failed to query the log. Check whether the task ID and execution ID are valid. | Failed to query the log. Check whether the task ID and execution ID are valid. |
| 404 | InvalidExecution.NotFound | The execution plan does not exist. Check whether the parameters such as the execution ID, start time, and end time are correct. | The execution plan does not exist. Check whether the parameters such as the execution ID, start time, and end time are correct. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.