File download issue in running export with python API

Contributor

File download issue in running export with python API

Hi Everyone,


I have been trying to run an export action and a process containing the export action using python API for Anaplan. The output shows python API running the export perfectly but no file gets downloaded. Can anyone suggest the reason for the same and if any workaround is available for this issue ?

 

I need the user to enter the data in module in Anaplan and need the python script whenever run to be able to pick the latest copy of the data from the module.

 

Any help would be appreciated.

 

Regards,

Aakash Sachdeva

4 REPLIES 4
Certified Master Anaplanner

Re: File download issue in running export with python API

Hey @aakash,

 

Not 100% sure what you have included in your code but hopefully this will get you in the right direction.

With Imports and Exports with the API you have to conduct multiple steps. Running the export will start that export task in Anaplan and return a task ID. You can use that to monitor the task to confirm that it has completed. Once it has completed you need to confirm the number of chunks to then get that chunk of data. The API includes these additional steps within the Export Actions and Download Files for Actions section.

 

https://anaplanbulkapi20.docs.apiary.io/#reference/export-actions

Contributor

Re: File download issue in running export with python API

hi Johndorma,
Thanks a lot. I didn't know about the steps involved after getting the task ID. I followed your advice and my file is downloading perfectly now.
For anyone struggling with python API to do the same, following steps are involved,
1. Get Task ID
2. Check Status of Task
3. Download the file.

Regards,
Aakash Sachdeva
Occasional Contributor

Re: File download issue in running export with python API

Hi @aakash ,

I'm also facing the same issue. Can I please look at your code(dummy) to understand how you have done it so that I can create the same type of function to retrieve the file.

 

New Contributor

Re: File download issue in running export with python API

I have tried downloading file from Google Drive to my local system using python script but facing a "forbidden" issue while running a Python script. Smarttip