Use this procedure to run an import that uses a mapping parameter. In this example, the import maps data into the Actual item in the Version dimension.
Make sure you have:
- A valid Anaplan authentication token.
- The workspace ID.
- The model ID.
- The import ID for the import you want to run.
- Access permissions to run the import in the target model.
Endpoint
POST /workspaces/{workspaceId}/models/{modelId}/imports/{importId}/tasks
Procedure
- Create a
POSTrequest to the import tasks endpoint.
curl -X POST \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Content-Type: application/json' \
-d '{
"localeName": "en_GB",
"mappingParameters": [
{
"entityType": "Version",
"entityName": "Actual"
}
]
}' \
'https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/imports/{importId}/tasks'
- Replace the path parameters with your own values. Parameter Required Type Description Example
workspaceIdYes string The workspace ID.8a8b8c8d8e8f8g8i modelIdYes string The model ID.75A40874E6B64FA3AE0743278996850F importIdYes number The import ID.112000000018 - In the request body, specify the locale and mapping parameter. The
localeNamevalue must appear before themappingParametersarray. ThemappingParametersarray tells Anaplan which target dimension item to use when running the import. In this example, the import maps data into theActualitem in theVersiondimension.
{
"localeName": "en_GB",
"mappingParameters": [
{
"entityType": "Version",
"entityName": "Actual"
}
]
}
- Send the request. If the request is successful, Anaplan returns a task ID.
Example response
{
"meta": {
"schema": "https://api.anaplan.com/2/0/models/75A40874E6B64FA3AE0743278996850F/objects/task"
},
"status": {
"code": 200,
"message": "Success"
},
"task": {
"taskId": "310296FE3D914C84AC813E7758A085DB"
}
}
Result
The import task starts. Use the returned taskId to check the status of the import task.