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.
/models/{modelId}/alm/summaryReportTasks/{taskId}
Parameters
| 3Parameter | Details |
modelId | String. Required.The ID of the target model that you used when you created the summary report generation task. |
taskId | The ID of the summary report generation task. This is the task.taskId value returned when you created the task. |
Curl example
curl -X GET 'https://api.anaplan.com/2/0/models/7282C939A7F54B9A88CB39920592F338/alm/summaryReportTasks/48B7FB976E8F4FBDAD925EC90BADB4FC' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'
Response
All responses have the header Content-Type: application/json.
200 OK: task in progress
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.
200 OK: task complete and successful
{
"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.
200 OK: task complete but unsuccessful
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
}
}
Response body elements
| Element | Type | Details |
task.taskId | String | The ID of the summary report generation task. |
task.taskState | String | The state of the task. IN_PROGRESS while the report is generating, and COMPLETE when the task has finished, whether or not it succeeded. |
task.currentStep | String | A description of the task's current step, for example Complete. or Failed. |
task.creationTime | Integer | When the task was created, in milliseconds since the Unix epoch (UTC). |
task.result.successful | Boolean | true if the report was generated, false if it was not. |
task.result.targetRevisionId | String | The ID of the target revision. Only returned when successful is true. |
task.result.sourceRevisionId | String | The ID of the source revision. Only returned when successful is true. |
task.result.reportFileUrl | String | The URL to retrieve the summary report contents. Only returned when successful is true. |
task.result.error.title | String | A short title for the error. Only returned when successful is false. |
task.result.error.messageText | String | More detail about why the report could not be generated. Only returned when successful is false. |