How to purge azure CDN cache for an individual item programmatically

saibalini ray 31 Reputation points
2021-05-03T13:44:49.057+00:00

Hi,

Is there any way to purge CDN cache for an individual item programmatically?
We need an API which wil help us to delete the cache for an item.

Any help will be appreciated.

Azure Content Delivery Network
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 49,806 Reputation points Microsoft Employee
    2021-05-07T13:42:29.943+00:00

    Hello @saibalini ray ,

    You can use the below Rest API doc to purge content from Azure CDN:
    https://learn.microsoft.com/en-us/rest/api/cdn/cdn/endpoints/purgecontent

    In the request body, under contentPaths parameter, you can provide the path to the content to be purged. It can describe a file path or a wild card directory.

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.