Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2020-12-16 18:31:28

moxiesozo
Member
Registered: 2020-12-16
Posts: 2

Get direct links for all files in a folder

Is there one api call against a folder by ID that will also return the direct links and extended metadata for each file?

Ideally /folders/xxx/files would return an array of files with their direct links, caption and title.

I was able to do this previously with Files_GetAssetsForParent . Is this possible? From the Rest API docs I need to get all of the files, loop through them, and make individual calls for the direct links and potentially extra metadata?

Thanks for any help .

Offline

#2 2020-12-18 16:35:46

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: Get direct links for all files in a folder

Hi,

Using the REST API you are correct - you have to GET /rest/v1/files/{fileId}/directUrl for each file separately.

You could use the JSON API to call Downloads_GetMultiLink, which would allow you to get URLs for multiple at the same time - see https://media.chorus.thirdlight.com/doc … tMultiLink

I would suggest that the REST approach is preferable overall, unless the numbers of files are very large, or if you want to use other options that are only available with the other.

Offline

#3 2020-12-18 17:22:42

moxiesozo
Member
Registered: 2020-12-16
Posts: 2

Re: Get direct links for all files in a folder

Great to know the limitations and that there is still the opportunity to use the JSON API .

Offline

Board footer