v1
latestOpenAPI 3.1.02026-07-2618690613.4 KBModels
Migrate a model
Copy a model from one Omni connection to another by reading the source model's YAML at a specific Git ref and writing it to the target model. Supports same-organization and cross-organization migrations.
This API:
- Reads the full model YAML from the source model's git repository at the specified gitRef (merged with the default branch).
- If branchName is provided and the branch already exists on the target model, the API writes to that branch. If the branch doesn't exist, one is created.
- Writes the YAML to the target model or branch, replacing its model definition.
Requirements
To successfully migrate a model:
- The user performing the migration must have:
- For the source model - Querier, Modeler, or Connection Admin permissions
- For the target model - Modeler or Connection Admin permissions
- For cross-organization migrations - The user must be a member of both organizations
- The source model must have git configured. This is required so the API can read the model YAML from the repository.
- The target model should have an identical schema model to the source model at the instant the git ref was committed.
post/v1/models/{modelId}/migrate
Path parameters
modelIdstring uuid required
The shared model ID to read YAML from.
Request body
Example request
{
"gitRef": "main",
"targetModelId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branchName": "migrate-from-prod",
"commitMessage": "Migrate model from production",
"deleteViewsAndTopicsMissingFromSource": true
}Response
Model migrated successfully
Example response
{
"success": true
}