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, dataTypes shows 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 dataTypes shows "MIXED".
GET

/workspaces/{workspaceId}/models/{modelId}/exports/{exportId}

ParameterDescription
workspaceId
  • Required
  • Type: string
  • Description: The workspace ID
  • Example: 8a8b8c8d8e8f8g8i
modelId
  • Required
  • Type: string
  • Description: The model ID
  • Example: 75A40874E6B64FA3AE0743278996850F
exportId
  • Required
  • Type: number
  • Description: The export definition ID
  • Example: 116000000001

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'

{
   "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.