question

saibaliniray-0370 avatar image
0 Votes"
saibaliniray-0370 asked SimonBourdeau-6955 commented

How to purge azure CDN cache for an individual item programmatically

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-cdn
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GitaraniSharmaMSFT-4262 avatar image
1 Vote"
GitaraniSharmaMSFT-4262 answered SimonBourdeau-6955 commented

Hello @saibaliniray-0370 ,

You can use the below Rest API doc to purge content from Azure CDN:
https://docs.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.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you. I will try and accept this as answer if works.

1 Vote 1 ·

Hello @saibaliniray-0370 , any updates on this issue?

0 Votes 0 ·

Thanks. It worked!

1 Vote 1 ·