v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
Model 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

branch_idstring uuid required

UUID of the Omni branch to commit.

commit_messagestring required

Commit message for the git commit.

allow_branch_existsboolean

Set false to fail if git branch already exists (Create-only mode).

require_branch_existsboolean

Set true to fail if git branch doesn't exist (Update-only mode).

Example request

{
  "branch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "commit_message": "Add new customer dimension",
  "allow_branch_exists": true
}

Response

Commit operation completed successfully

pr_urlstring

URL of the created or updated pull request.

git_shastring

The git SHA of the commit.

in_syncboolean

Whether the shared model is currently in sync with its configured default git branch.

did_syncboolean

Whether a sync operation was performed between the shared model and its configured default git branch.

Example response

{
  "pr_url": "https://github.com/myorg/repo/compare/main...feature?expand=1",
  "git_sha": "abc123def456",
  "in_sync": true,
  "did_sync": true
}