Retrieves the file object associated with an import data source, including the file ID needed for a later upload calls.

This helps the integration identify the correct Anaplan file target before sending new source data.

In this API:

  • id is the ID that you need to upload the file.
  • name is the filename of the file.
  • chunkCount is the number of chunks in the file.
  • delimiter is double-quotes for columns and fields. For example, "Versions","Opportunities"," "Version 1","Opportunity 0001".
  • encoding determines the way in which bytes in a file map to Unicode character code points. See Common Character Encodings on Wikipedia.
  • firstDataRow is the first row after the row containing column names.
  • format is text, as opposed to a binary stream.
  • headerRow is the row that contains column names.
  • separator is the token that separates fields. This is typically a comma, for example, "Versions","Opportunities"," "Version 1","Opportunity 0001".
GET

/workspaces/{workspaceId}/models/{modelId}/files

ParameterDescription
workspaceId
  • Required
  • Type: string
  • Description: The workspace ID
  • Example: 8a8b8c8d8e8f8g8i
modelId
  • Required
  • Type: string
  • Description: The model ID
  • Example: FC12345678912343455667

curl -X GET \
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/files \
-H 'Authorization: AnaplanAuthToken {token_value}'
-H 'Accept:application/json'

{
  "meta": {
    "paging": {
      "currentPageSize": 9,
      "offset": 0,
      "totalSize": 9
    },
      "schema": "https://api.anaplan.com//2/0/models/75A40874E6B64FA3AE0743278996850F/objects/file"
    },
    "status": {
      "code": 200,
      "message": "Success"
    },
  "files": [
    {
      "id": "113000000000",
      "name": "#T & #R.csv",
      "chunkCount": 0,
      "delimiter": "\"",
      "encoding": "ISO-8859-1",
      "firstDataRow": 2,
      "format": "txt",
      "headerRow": 1,
      "separator": ","
    },
    {
      "id": "113000000001",
      "name": "#T & #R-1.csv",
      "chunkCount": 0,
      "delimiter": "\"",
      "encoding": "ISO-8859-1",
      "firstDataRow": 2,
      "format": "txt",
      "headerRow": 1,
      "separator": ","
    },
    {
      "id": "113000000002",
      "name": "Sales metrics (1) - POC load.csv",
      "chunkCount": 0,
      "delimiter": "\"",
      "encoding": "UTF-8",
      "firstDataRow": 2,
      "format": "txt",
      "headerRow": 1,
      "separator": ","
    },
    {
      "id": "116000000001",
      "name": "ExportGrid - ORG2Test.xls",
      "chunkCount": 1,
      "firstDataRow": 0,
      "headerRow": 0
    }
  ]
}