The first part of an import sequence is to upload your text or CSV file to the server.

To upload your text or CSV file: 

  1. Split your file into equal-sized chunks between 1 to 50 MB in size and count the number of chunks.
  2. Get the list of import actions for the user to obtain the import ID and the importDataSourceID (file ID).
    GET https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/imports
  3. Get a list of files.
    GET https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files
  4. Set the chunk count to -1.
    POST https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}
  5. Load all the file chunks in sequential order.
    PUT https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}/chunks/{chunkID}
  6. Once all the file chunks are loaded, mark the upload as complete.
    POST https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}/complete