Find the import ID from file ID

Hello Experts ,

 

I'm new to Anaplan and trying to integrate anaplan using Rest API . 

We are sending data to anaplan for which I would need an import ID .

 

However , I have been provided with a file ID by ANAPLAN . Could anyone guide as to how import ID can be retreived from a file ID ?

Also if someone can explain the difference between a file ID /name and an import ID/name , that would help me as well .

 

Thanks ,

Nitheesh

Answers

  • Hi Nitheesh,

    A file ID begins with 113 and an import ID begins with 112
    The two are completely different and it's not possible to find out the import ID from the file ID or vice versa

    In case the final objective of your integration is to run a file based import:
    you will have to trigger an API request to upload the file using the 113 and then trigger a separate API request to run the import action connected to the said file ID.

    Let me know if you need more help

    Regards,
    Anirudh

  • Hi Anirudh ,

    Thanks for your quick respose . Really appriciate your help .
    I might sound silly with my below question .

    My end goal is to transfer a file from an SAP system to ANAPLAN . As far as I understand from the documentation, it is an import action (Sending data to ANAPLAN).

    Can I acheive this with file ID ? Or do I need an Import ID as well for the same ?
    Also , for my scenario , I have been provided with a file ID and process name. Is there any way I can trigger an Import action using these details ?

    Thanks ,
    Nitheesh
  • Nitheesh,

    Looks like you have access to the Anaplan model itself. If you do, follow the API guide here
    https://anaplanbulkapi20.docs.apiary.io/#reference/process and extract the process id. The process name is not enough to trigger it
    If you do not have access to Anaplan, then you will have to get the process id first...

    Then you will have to trigger two requests, one to upload the file and another to run the process itself. The import id is not required as you have the process id

    Regards,
    Anirudh
  • Hi Anirudh ,

    Thank you for being so responsive. Your replies are indeed helping me .

    I have now fetched the process ID from anaplan using the process name.
    I have the process ID with me now .

    Just to get my basics right , As you suggested above , I did run the upload file first using the below command
    https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/files/{fileId}
    It gave me a 204 response as expected .

    Now I have to run the process using below way
    https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/processes/{processId}/tasks

    But here , My file ID and Process ID are both different and how do they both map internally ? Am I missing something here ?

    Thanks ,
    Nitheesh
  • So the way the Anaplan API works is on a file upload, the file definition is updated with the file you upload. You can always check the latest file definition by going to Actions -> Import Data Sources.

    On running the process it always runs the process based on the last uploaded file. If no file was uploaded, it uses the default file. A default file is created when the action is created for the very first time. After 48 hours, even the default file will expire and the process/import will no longer successfully finish. This is also the point where the Set Default File for administrator, everyone or just me comes into play. Each user can have their own default file definition

    Hope this clarifies!

    Regards,
    Anirudh

  • Thanks Anirudh for your patience in responding to the queries . Really appreciate the efforts .

    Regards ,
    Nitheesh