Perform Data insertion in Anaplan Module and List through API

I have working on a integartion where i need to push data from a Asp.Net webform to Anaplan Model and List.

To perform such action i am using Anaplan API's from the Anaplan suggested method of import: https://community.anaplan.com/t5/How-To/RESTful-API-How-To/ta-p/33579

While running api i am unable to update data , every time i hit api, anaplan always take file which is used while creating import action and even if i manually update rows in that file still its updating old data which is used while creating import action.
So when i created a import action by selecting a csv file i kept "Default File" and "Replace Default File" setting as "Everyone" still every time when i run API it takes same rows data which is kept initially at the time of creating import action even.
So how can i achieve that, i.e. always updated data will be passed in to Anaplan and if that file doesn't contain any row of data then it will not update any rows in Anaplan?
Is there any way i can pass the file path in API for import action so that it will take that file only?
Or is there any other approach which i can use to inser data in anaplan module and list?

Answers

  • @gauravku 

    Oh, so close! Love what you're doing. I use Python to do the same thing but you can use ASP.net webforms too. As long as you can POST or GET. So, in your case, using the Anaplan API requires two (2) steps, not one. It's not entirely intuitive but you first have to UPLOAD the file, then run the IMPORT action to import into an Anaplan module.

    You are correct that for step 2, you must create the import action manually and use ADMIN or EVERYONE so the default file is resusable by other IDs.

  • Did you get any proper solution?, I am also facing the same issue.

    My Ascension Login

  • @JaredDolich 
    Could you please let me know how we can upload a file for specific Import?
    As i unable to find solution to Import data to Anaplan.
    Could you please share steps or elaborate the process of import using API?

     

    Also is there any way using Transaction API through which we can add/import data to Anaplan if yes how we can do that as on documentation page its not clear.

  • @JaredDolich 
    Also please let us know how we can upload a new data file with updated data in it considering it has same name and same schema we used while creating import in anaplan?

  • @gauravku @Sandra859 

    First, make sure you read this: https://anaplan.docs.apiary.io/#/reference/upload-files

    Notice there's also a link to show you how to set the chunk count which is recommended at 50MB. Optionally, you can let Anaplan decide but you said that action takes too long.

    It's a two step process:

    1. You must first upload the file (first time must be manual with EVERYONE or ADMIN).
    2. You then run the import to move the data from the uploaded file to the module (Import action)

    I also recommend that you do not use a process. Run these as individual tasks.

    Since I use Python I cannot share a ASP.net example.