Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTim van der Zouwen
7,393 PointsHow to get files from a folder?
I want to GET the files from a folder I created in Mailchimp. With the endpoint "file-manager/folders" I can display my folders.
After finding my folder ID I want to fetch the files from that folder with the endpoint "file-manager/folders/9999/" I receive a name and file_count
With that checked I want to receive the files from that folder with the endpoint "file-manager/folders/9999/files" but here is where I end up with the following error:
The resource 'GalleryFolder_files_collection' could not be found.
Is there something wrong with my request or is it something else?
3 Answers
Nate Ranson
Treehouse Guest TeacherHey Tim --
That looks like something may be wrong on our end of things. Would you mind reaching out to our API support team at apihelp [at] mailchimp [dot] com?
Thanks so much!
Tim van der Zouwen
7,393 PointsHey Nate,
Thank you for your quick response. I will send the question above to the API support team.
I will let you know what their response is.
Tim van der Zouwen
7,393 PointsHey Nate,
This is what I got from mailchimp:
Hey there Tim,
Thanks for writing into us at MailChimp API support. That's quite an odd error for the provided curl request and I'll be happy to assist with that.
I did some testing and checking on our end, and it does seem like we're 404ing on valid requests to the endpoint. Because of this, I've gone ahead and opened a ticket with our developers to get a fix pushed out for that, though I wouldn't be able to provide an ETA on when that would be available.
To look at all of your files, you'll want to use the GET parameters count and offset so that you can page through the files. Count can be increased to return more results, though after it is increased enough, the request will eventually time out, so you'll have to page through results using the offset parameter to get any additional results afterwards. We have some more information on pagination in one of our docs available here: http://kb.mailchimp.com/api/article/api-3-overview
If you have any additional quiestions or concerns, please don't hesitate to get back in touch. We'll be happy to assist in any way we can.
Thank you, Lucas