Using the Files API to check if a folder exists before creating it…
If I use
https://api.assembly.com/v1/files?channelId=XXXX&path=FolderName
and the folder exists, it returns the files in that folder, and an empty result if there are no files.
But if the folder does not exist, it also returns an empty result, so I can’t tell the difference between a folder not existing and an empty folder.
The only way I can tell is to get all of the files in the channel and iterate through them where the object type = “folder” and the name = the name I am checking for existence.
Is there another way to do that that doesn’t require that?