How do I browse through all the resources in my account using the API?

Follow

Comments

6 comments

  • Avatar
    Debra Ornelas

    I don't understand what it is I need to get my phone with the right files and URL's it needs can you help me?

  • Avatar
    Roee Ben-Ari

    Hi Debra, please contact us via a support ticket with more information regarding your use-case.

  • Avatar
    Susan lindroos

    How can I do this in node.js?

  • Avatar
    Roee Ben-Ari

    Hi Susan, 

    You can do something like this:

    var result = [];
    var options = options = { type: "upload", max_results: 500 };

    function listResources(next_cursor) {
    if(next_cursor) {
    options["next_cursor"] = next_cursor;
    }
    cloudinary.api.resources(options, function(error,res){
    resources = res.resources;
    result = result.concat(resources);
    var more = res.next_cursor;
    listResources(more);
    });
    }

  • Avatar
    Susan lindroos

    Thank you! With few modifications I got it work nicely. :-)

  • Avatar
    Roee Ben-Ari

    That's great! thanks for the update :)

Please sign in to leave a comment.