List prefetch history
GET
/
cloud-cdn
/
tools
/
prefetch
/
history
List prefetch history
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/tools/prefetch/history \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/tools/prefetch/history"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/tools/prefetch/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/tools/prefetch/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"id": 123,
"project_id": 123,
"distribution_id": 123,
"distribution_name": "<string>",
"operation_type": "purge",
"paths": [
"<string>"
],
"status": "success",
"created_at": "2023-11-07T05:31:56Z",
"purge_mode": "all",
"error_message": "<string>",
"requested_by": "<string>"
}
]{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}Authorizations
Access key beginning with APTRANET_.
Current secret paired with the access key.
Response
Prefetch operations.
Available options:
purge, prefetch Available options:
success, failed Available options:
all, urls, patterns, List prefetch history
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/tools/prefetch/history \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/tools/prefetch/history"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/tools/prefetch/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/tools/prefetch/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"id": 123,
"project_id": 123,
"distribution_id": 123,
"distribution_name": "<string>",
"operation_type": "purge",
"paths": [
"<string>"
],
"status": "success",
"created_at": "2023-11-07T05:31:56Z",
"purge_mode": "all",
"error_message": "<string>",
"requested_by": "<string>"
}
]{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}