Creating a Cache Preheating Task
Function
This API is used to create a cache preheating task.
URI
POST /v1.0/cdn/content/preheating-tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project to which the cache preheating task is added. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the corresponding IAM API (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
preheating_task |
Yes |
PreheatingTaskRequestBody object |
Cache preheating settings. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
preheating_task |
String |
Task ID. |
Example Requests
POST https://{endpoint}/v1.0/cdn/content/preheating-tasks?enterprise_project_id=0 { "preheating_task" : { "urls" : [ "https://www.bxxx/1.txt", "http://www.bxxx/2.txt" ] } }
Example Responses
Status code: 200
OK
{ "preheating_task" : "7620240" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.