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:
idis the ID that you need to upload the file.nameis the filename of the file.chunkCountis the number of chunks in the file.delimiteris double-quotes for columns and fields. For example, "Versions","Opportunities"," "Version 1","Opportunity 0001".encodingdetermines the way in which bytes in a file map to Unicode character code points. See Common Character Encodings on Wikipedia.firstDataRowis the first row after the row containing column names.formatis text, as opposed to a binary stream.headerRowis the row that contains column names.separatoris the token that separates fields. This is typically a comma, for example, "Versions","Opportunities"," "Version 1","Opportunity 0001".
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 {token_value}'
-H 'Accept:application/json'
Response
Response 200 (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
}
]
}