Surrogate Key assignment from the API
I use Cloudinary in conjunction with Fastly. Cloudinary derives transformed images on the fly, and stores them. Fastly then picks those images up. Each image has a unique url based on the original url, with appended transformation parameters.
I would like to be able to make an api call which will purge an image and all content that shares a url prefix with that image. It seems to me that either surrogate keys defined by the original image, or wildcard purges would be the best way to do that.
In the documentation, both of those services need manual attention in the Fastly UI. Can this be done with API calls?
-
Yes, it can be done with API calls. And we don't support wildcard purges, so Surrogate Key purges is the way to go here.
Though, I hope you're talking about doing the purging with API calls, not the configuring to make the purges possible. Because while possible, it's slightly painful.
Do you have examples of multiple images with multiple URLs each? That way we can guide you how to add the Surrogate Keys to the objects.
Please sign in to leave a comment.
Comments
1 comment