Files API

get
Lookup files in a repo

https://pagecdn.com/api/v2/private/file/lookup
Request
Response
Request
Query Parameters
apikey
required
string
The api key to identify originator of the request.
repo
required
string
The repo of which you want to lookup files, as repo/my-website-repo.
hash
required
string
Sha256 hash of the file you want to lookup inside the repo.
Response
200: OK
{
"status": "200",
"message": "Ok",
"details": "Success",
"response": {
"count": 1,
"files": [
{
"version": "3.3.1",
"file_hash": "160a426ff2894252cd7cebbdd6d6b7da8fcd319c65b70468f10b6690c45d02ef",
"file_url": "https://pagecdn.io/lib/jquery/3.3.1/jquery.min.js"
}
]
}
}

Sample Requests

https://pagecdn.com/api/v2/private/file/lookup?apikey=160a426ff2894252cd7cebbdd6d6b7da8fcd319c65b70468f10b6690c45d02ef&hash=160a426ff2894252cd7cebbdd6d6b7da8fcd319c65b70468f10b6690c45d02ef&repo=lib/jquery

get
Delete a file

https://pagecdn.com/api/v2/private/file/delete
Request
Response
Request
Query Parameters
apikey
required
string
The api key to identify originator of the request.
file_url
required
string
The URL of the file you want to delete, as https://pagecdn.io/repo/my-files/path-to-file.ext.
Response
200: OK
{
"status": "200",
"message": "Ok",
"details": "Success",
"response": []
}

Sample Requests

https://pagecdn.com/api/v2/private/file/delete?apikey=160a426ff2894252cd7cebbdd6d6b7da8fcd319c65b70468f10b6690c45d02ef&file_url=https%3A%2F%2Fpagecdn.io%2Flib%2Fjquery%2F3.3.1%2Fjquery.min.js

get
Purge edge cache of a file

https://pagecdn.com/api/v2/private/file/purge
Request
Response
Request
Query Parameters
apikey
required
string
The api key to identify originator of the request.
file_url
required
string
The URL of the file you want to purge, as https://pagecdn.io/repo/my-files/path-to-file.ext
Response
200: OK
{
"status": "200",
"message": "Ok",
"details": "Success",
"response": []
}

Sample Requests

https://pagecdn.com/api/v2/private/file/purge?apikey=160a426ff2894252cd7cebbdd6d6b7da8fcd319c65b70468f10b6690c45d02ef&file_url=https%3A%2F%2Fpagecdn.io%2Flib%2Fjquery%2F3.3.1%2Fjquery.min.js