v4

latestOpenAPI 3.1.02026-08-01207318738.7 KB
Models

Commit branch to git

Push the branch contents to git and create or update a pull request. The backend automatically detects whether the git branch already exists: if not, it creates a new git branch and opens a PR; if it does, it commits the latest model contents to the existing branch (updating the open PR).

post/api/v1/models/{modelId}/git/commit

Path parameters

modelIdstring uuid required

Model UUID

Example:123e4567-e89b-12d3-a456-426614174000

Model UUID

Request body

allow_branch_existsboolean

If true (default), the commit succeeds whether the git branch already exists or not. If false, the request fails when the git branch already exists — use this to ensure only new pull requests are created. Cannot be false when require_branch_exists is true.

branch_idstring uuid required

UUID of the branch to commit.

commit_messagestring required

Commit message for the git commit.

require_branch_existsboolean

If true, the request fails when the git branch does not already exist — use this to ensure only existing pull requests are updated. Defaults to false. Cannot be true when allow_branch_exists is false.

Example request

{
  "allow_branch_exists": true,
  "branch_id": "123e4567-e89b-12d3-a456-426614174001",
  "commit_message": "Add new orders view"
}

Response

Branch committed to git and pull request created or updated

did_syncboolean required

Whether a sync operation was performed against git

git_shastring nullable required

The git SHA of the commit that was pushed (null if no commit was needed)

in_syncboolean required

Whether the branch is in sync with git after the operation

pr_urlstring nullable required

The URL of the pull request (or PR creation page for newly-created PRs). May be null when the underlying git provider is not recognized.