Use this procedure to run a process that carries out an import with 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 process ID for the process you want to run.
  • Access permissions to run the process in the target model.

POST /workspaces/{workspaceId}/models/{modelId}/processes/{processId}/tasks

  1. Create a POST request to the process 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}/processes/{processId}/tasks'

  1. Replace the path parameters with your own values. Parameter Required Type Description Example workspaceId Yes string The workspace ID. 8a8b8c8d8e8f8g8i modelId Yes string The model ID. 75A40874E6B64FA3AE0743278996850F processId Yes number The process ID. 118000000002
  2. In the request body, specify the locale and mapping parameter. The mappingParameters array tells Anaplan which target dimension item to use when running the import. In this example, the process imports data into the Actual item in the Version dimension.

 {
 "localeName": "en_GB",
 "mappingParameters": [
   {
     "entityType": "Version",
     "entityName": "Actual"
   }
 ]
}

  1. Send the request. If the request is successful, Anaplan returns a task ID.

{
 "meta": {
   "schema": "https://api.anaplan.com/2/0/models/75A40874E6B64FA3AE0743278996850F/objects/task"
 },
 "status": {
   "code": 200,
   "message": "Success"
 },
 "task": {
   "taskId": "895F524FDAC64764AB4E7EA02F952446"
 }
}

The process task starts. Use the returned taskId to check the status of the process task.