Generates a complete metadata comparison report detailing differences between two structural model revisions. 

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.  

POST

/models/{targetModelId}/alm/comparisonReportTasks 

Parameter Location Required Description 
targetModelId Path Yes The ID of the model containing the target revision. 

curl -X POST "https://api.anaplan.com/2/0/models/{targetModelId}/alm/comparisonReportTasks" \
 -H "Authorization: AnaplanAuthToken {anaplan_auth_token}" \
 -H "Content-Type: application/json" \
 --data-raw '{
   "sourceRevisionId": "<revision_to_sync>",
   "sourceModelId": "<source_model_id>",
   "targetRevisionId": "<latest_revision_on_target_model>"
 }'

When the request is successful, the API returns an HTTP 201 Created status code. This endpoint triggers report generation. You can check the task status and get the download URL using the Retrieve info for a full comparison report generation task endpoint.

  • Content-Type: application/json 
  • Location: <URL of the created comparison report generated task> 

{
 "meta": {
   "schema": "https://api.anaplan.com/2/0/objects/taskWithUrl"
 },
 "status": {
   "code": 201,
   "message": "Created"
 },
 "task": {
   "taskId": "6C283D93A9E64570BF502B8F7AF67A00",
   "taskUrl": "https://api.anaplan.com/2/0/models/7282C939A7F54B9A88CB39920592F338/alm/comparisonReportTasks/6C283D93A9E64570BF502B8F7AF67A00",
   "taskState": "IN_PROGRESS",
   "creationTime": 1614618651855
 }

}

Review the ALM API troubleshooting guide to resolve any error responses from API calls.