In this article, we will be explaining the utilization details of prefetching on API. You can follow the steps below:
1. When you open any distribution page on Merlin Panel, inside the URL, you can find the organization id, workspace id, and distribution id in this specific order.
For example, if the URL on the search bar when you open a distribution’s page:
https://app.merlincdn.com/1/13/distributions/56
Then,
the organization id is 1,
the workspace id is 13,
and the distribution id is 56.
2. You need to define the URL pattern in the path area in order to execute the prefetch process.
3. Token information should be obtained from Merlin Panel by clicking Profile → API → Enable Merlin API Key.
4. The request should be delivered as:
curl --location --request GET 'https://apis.merlincdn.com/v1/cdn/distributions/{Distribution id}/cache-prefetch?organization_id={Organization id}&workspace_id={Workspace id}' \
--header 'Authorization: Bearer {Token}' \
--data-raw ' {
"path": "/blog",
"headers": [
{
"key": "Accept",
"value": "application/json"
} ]
}'
For more detailed information on prefetching or how to do it on Merlin Panel, check out this article.
Comments
Please sign in to leave a comment.