This gets a list of both the import and export files for a model. You can identify an export file by its metadata and id

Export files have fewer metadata properties and the start of the first part of their ID is different to that of an import file:

  • id is the file id.
  • name is the file name.
  • chunkCount is the number of chunks in the file.
  • firstDataRow is the first row after the row containing column names.
  • headerRow is the row that contains column names.
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: 75A40874E6B64FA3AE0743278996850F

curl -X GET \
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/files
-H 'authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Content-Type:application/json'

{
   "meta":{
      "paging":{
         "currentPageSize":3,
         "offset":0,
         "totalSize":3
      },
      "schema":"https://api.anaplan.com/2/0/models/75A40874E6B64FA3AE0743278996850F/objects/file"
   },
   "status":{
      "code":200,
      "message":"Success"
   },
   "files":[
      {
         "id":"113000000000",
         "name":"UploadedWork.csv",
         "chunkCount":0,
         "delimiter":"\"",
         "encoding":"UTF-8",
         "firstDataRow":2,
         "format":"txt",
         "headerRow":1,
         "separator":","
      },
      {
         "id":"113000000003",
         "name":"FileUploadB2.csv",
         "chunkCount":1,
         "delimiter":"\"",
         "encoding":"UTF-8",
         "firstDataRow":2,
         "format":"txt",
         "headerRow":1,
         "separator":","
      },
      {
         "id":"116000000000",
         "name":"ExportFile12.csv",
         "chunkCount":0,
         "firstDataRow":0,
         "headerRow":0
      }
   ]
}