v1
latestOpenAPI 3.1.02026-07-2618690613.4 KBModel Git configuration
Create or update a pull request for a model branch
<Note> This endpoint requires **Modeler** or **Connection Admin** permisisons. </Note>Push a branch's model contents to Git and create or update a pull request. This mirrors the Create Pull Request / Update Pull Request buttons in Omni allowing API consumers and AI agents to drive the pull request workflow programmatically.
By default, the endpoint automatically detects whether the Git branch exists. If a branch doesn't exist, a successful request will create a new Git branch and open a pull request. If a branch does exist, a commit will be added to the branch.
The allow_branch_exists and require_branch_exists parameters constrain this behavior:
- Create or update mode (default) - Auto-detects and handles both scenarios
- Create-only mode (allow_branch_exists: false) - Fails if the Git branch already exists
- Update-only mode (require_branch_exists: true) - Fails if the Git branch doesn't exist
post/v1/models/{modelId}/git/commit
Path parameters
modelIdstring uuid required
The unique identifier of the shared model.
Request body
Example request
{
"branch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"commit_message": "Add new customer dimension",
"allow_branch_exists": true
}Response
Commit operation completed successfully
Example response
{
"pr_url": "https://github.com/myorg/repo/compare/main...feature?expand=1",
"git_sha": "abc123def456",
"in_sync": true,
"did_sync": true
}