Use this endpoint to check the progress and outcome of a summary report generation task. 

When you create a summary report generation task, the report is generated in the background. Call this endpoint with the task ID to find out whether the task is still running, whether it completed successfully and, if it did, the URL you use to retrieve the summary report contents.

For best performance and outcomes, make all API calls to your closest regional server. To learn more about this, read URL, IP, and allowlist requirements.

Note: You must be a Workspace Administrator for both the target and source model workspaces. Additionally, ensure you have access privileges to both models.  

Note: This is one of three steps. First, start the task with the Create a summary report generation task endpoint. Then call the Retrieve summary report content endpoint until the task is complete. Finally, retrieve the report from the reportFileUrl in the result with the Retrieve the contents for a summary report endpoint.

GET

/models/{modelId}/alm/summaryReportTasks/{taskId}

3ParameterDetails
modelIdString. Required.The ID of the target model that you used when you created the summary report generation task.
taskIdThe ID of the summary report generation task. This is the task.taskId value returned when you created the task.

curl -X GET 'https://api.anaplan.com/2/0/models/7282C939A7F54B9A88CB39920592F338/alm/summaryReportTasks/48B7FB976E8F4FBDAD925EC90BADB4FC' \

-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'

All responses have the header Content-Type: application/json.

The task is still running. Wait, then call the endpoint again.

{
    "meta": {
        "schema": "https://api.anaplan.com/2/0/objects/syncTask"
    },
    "status": {
        "code": 200,
        "message": "Success"
    },
    "task": {
        "taskId": "48B7FB976E8F4FBDAD925EC90BADB4FC",
        "taskState": "IN_PROGRESS",
        "creationTime": 1614870183373
    }
}

This example is illustrative. The response can also include a currentStep value that describes the step the task is on.

{
   "meta": {
       "schema": "https://api.anaplan.com/2/0/objects/syncTask"
   },
   "status": {
       "code": 200,
       "message": "Success"
   },
   "task": {
       "taskId": "48B7FB976E8F4FBDAD925EC90BADB4FC",
       "currentStep": "Complete.",
       "result": {
           "successful": true,
           "targetRevisionId": "795731A31D1A47EFB3802EA6355C62C4",
           "sourceRevisionId": "E7F72A49B23C43638DC77839D78B33BE",
           "reportFileUrl": "https://api.anaplan.com/2/0/models/{modelId}/alm/summaryReports/795731A31D1A47EFB3802EA6355C62C4/E7F72A49B23C43638DC77839D78B33BE"
       },
       "taskState": "COMPLETE",
       "creationTime": 1614870183373
   }
}

The report is ready. Use task.result.reportFileUrl to retrieve the contents.

The task finished but the report could not be generated. The reason is in task.result.error.

{
   "meta": {
       "schema": "https://api.anaplan.com/2/0/objects/syncTask"
   },
   "status": {
       "code": 200,
       "message": "Success"
   },
   "task": {
       "taskId": "9CF4E79BC78348539A5D994C18A8A18E",
       "currentStep": "Failed.",
       "result": {
           "successful": false,
           "error": {
               "title": "The target and source revisions are incompatible",
               "messageText": "Please choose a target and source revision that's compatible."
           }
       },
       "taskState": "COMPLETE",
       "creationTime": 1615387609842
   }
}

ElementTypeDetails
task.taskIdStringThe ID of the summary report generation task.
task.taskStateStringThe state of the task. IN_PROGRESS while the report is generating, and COMPLETE when the task has finished, whether or not it succeeded.
task.currentStepStringA description of the task's current step, for example Complete. or Failed.
task.creationTimeIntegerWhen the task was created, in milliseconds since the Unix epoch (UTC).
task.result.successfulBooleantrue if the report was generated, false if it was not.
task.result.targetRevisionIdStringThe ID of the target revision. Only returned when successful is true.
task.result.sourceRevisionIdStringThe ID of the source revision. Only returned when successful is true.
task.result.reportFileUrlStringThe URL to retrieve the summary report contents. Only returned when successful is true.
task.result.error.titleStringA short title for the error. Only returned when successful is false.
task.result.error.messageTextStringMore detail about why the report could not be generated. Only returned when successful is false.