How to retrieve a list of all resources sharing the same tag?

UPDATE: This method was recently added to the documentation section.

Cloudinary supports listing resources from the client-side by their tags.

The response is a JSON snippet containing all resources which correspond to the specified tag. When delivered, the JSON is being cached for 1 minute on the CDN, and being automatically updated if necessary.

Such an HTTP request will look something like:

http://res.cloudinary.com/<your_cloud_name>/<resource_type>/list/<tag>.json

The URL can also be generated using our client-libraries, e.g. (jQuery):

$.cloudinary.url('logo', {format: 'json', type: 'list'})

This will result with the following URL ('resource_type' is defaulted to image):

http://res.cloudinary.com/demo/image/list/logo.json

Which when sent as HTTP request, the following JSON will be returned

{
"resources":[{"public_id":"..", ... }, ...],
"updated_at":"..."
}

Note that, by default, Image list is restricted, therefore should be first allowed on the account's Security settings page.

For more information:
http://cloudinary.com/documentation/image_transformations#client_side_resource_lists

Have more questions? Submit a request

Comments

  • Avatar
    Suresh

    Was searching for this functionality. Thank you very much.

  • Avatar
    Suresh

    I am getting a CORS error when trying to fetch this URL from my angular application. How can i fix that issue?

  • Avatar
    Local

    Is it available for the Free Plan?

  • Avatar
    Nadav Ofir

    Suresh, please contact us via Support ticket so we can investigate further and find a solution to this failure.
    http://support.cloudinary.com/hc/en-us/requests/new

    Local, This feature is available to all of our users, regardless of the plan.

  • Avatar
    Local

    Thanks.

  • Avatar
    Richard Latman

    Whats the best way to blow out this cache. I would think you would invalidate it on a new upload.

  • Avatar
    Richard Latman

    It appears I have to make 3 api delete requests (image/video/raw) keeping originals to blow out the cached json files every time a new image is uploaded. Seems like a total pain.

  • Avatar
    Nadav Ofir

    Resources of type list are cached in the CDN for 1 minute and are removed with any change that can make the existing result no longer relevant.
    If you encounter any different behavior you are welcome to open a support ticket and we'll be happy to look into it.

  • Avatar
    Eloízio Salgado

    How long this service takes to start responding?

    I uploaded two images with the same tag and in a interval of 30 minutes still not having a response from this service (I'm getting a 404 response).

  • Avatar
    Local

    I think there can be cache for few hours?

  • Avatar
    Eloízio Salgado

    Ok. thanks.

    Is there a way of having the tags included in the response? The ADMIN API has tags parameter that enables that.

  • Avatar
    Nadav Ofir

    Eloízio, actually there's a recent feature request on this regards.
    Feel free to open a support ticket and we'll update you once it becomes available.

  • Avatar
    Sean Schofield

    >UPDATE: This method was recently added to the documentation section.

    Using this ^^ new approach, is there a way to not return deleted images?

Powered by Zendesk