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:
- Split your file into equal-sized chunks between 1 to 50 MB in size and count the number of chunks.
- 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
- Get a list of files.
GET https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files
- Set the chunk count to -1.
POST https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}
- Load all the file chunks in sequential order.
PUT https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}/chunks/{chunkID}
- 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