You can use the API to obtain metadata, such as column names, data types, and export format, for an export definition, using the model's ID.
- If the export has its line items in columns,
dataTypesshows the types."ENTITY"is any member of a List. - If the export has its line items in rows or pages, Anaplan does not know the types and
dataTypesshows"MIXED".
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/exports/{exportId}
Parameters
| Parameter | Description |
workspaceId |
|
modelId |
|
exportId |
|
Curl example
curl -X GET \
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/exports/{exportId} \
-H 'authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Content-Type:application/json'
Response
Response 200 (application/json)
{
"meta":{
"schema":"https://api-stg.anaplan.com/2/0/models/28D168FB7385407A8AC0026487733564/objects/exportMetadata"
},
"status":{
"code":200,
"message":"Success"
},
"exportMetadata":{
"columnCount":16,
"dataTypes":[
"ENTITY",
"MIXED",
"MIXED",
"MIXED",
"MIXED"
],
"delimiter":"\"",
"encoding":"UTF-8",
"exportFormat":"text/csv",
"headerNames":[
"ListWithSemiColonAsSeparator",
"Parent",
"Code",
"DepProjects",
"col1",
"col2",
"col3",
"col4",
"data",
"delete"
],
"listNames":[
"",
"",
"",
""
],
"rowCount":20432,
"separator":","
}
}
Note: The rowCount value in the response provides an estimate of the number of rows for the resulting export. The rowCount will likely be slightly different from the exported data.