Download A File Using API V1.3 - Do I Always Need to Delete File First?
I finally have gotten around to asking this question that's been bothering me since I started using the APIs to download a file. I get inconsistent results when I test this on my own so I thought I'd ask the Community.
The use case: I want to download a file (export) based on a view from a module using API v1.3 (Basic Auth is fine)
The most reliable steps I found to get an updated file download from a changed view is to:
- Create the export manually and run the action in Anaplan. (Use Postman or Python to get the fileID)
- From the API, Delete The File
- From the API, Run the Export Action
- From the API, Download The File
My question is do I always need to delete the file first before running the export? If not, what are the conditions that necessitate a file deletion first?
Two things to consider:
- I know delete file only works on private files. I'll get a 204 error if I try to delete an "admin" or "everyone" file. If I use an "everyone" file, can I just skip the delete file and always get an updated copy?
- If the view changes that creates the export, some type of action seems to be needed to get the new view. Is that a delete file? If that's the case, how do i do this if I use an "everyone" export? Do I have to run it manually first in Anaplan?
As always, thanks for your help!