Use this call to synchronize across two models.
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 and you must have access to the specified model.
Make sure the target model is both unlocked and unarchived. Archived models return an HTTP 422 error when it receives an API request.
If the source and target models are structurally compatible with one another, you can synchronize changes between them. Read more about the synchronization process on this page.
Use the Retrieve compatible source revisions and Retrieve latest revision endpoints to discover proper IDs for sourceRevisionId and targetRevisionId.
Method and endpoint
/models/{modelId}/alm/syncTasks
Curl Example
curl -X POST `'`https://api.anaplan.com/2/0/models/{modelId}/alm/syncTasks' \`\
-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>"}'
Response
If your response is successful, you receive a 201 Created HTTP status with a response body.
Response Header
Content-Type: application/jsonLocation: <URL of the created syncTask resource>
{
"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/syncTasks/6C283D93A9E64570BF502B8F7AF67A00",
"taskState": "IN_PROGRESS",
"creationTime": 1614618651855
}
}
Review the ALM API troubleshooting guide to resolve any error responses from API calls.