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.
file list
Export files have fewer metadata properties and the start of the first part of their ID is different to that of an import file:
idis the file id.nameis the file name.chunkCountis the number of chunks in the file.firstDataRowis the first row after the row containing column names.headerRowis the row that contains column names.
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/files
Parameters
| Parameter | Description |
workspaceId |
|
modelId |
|
Curl Example
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'
Response
Response 200 (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
}
]
}