Skip to main content
PATCH
/
v1
/
models
/
{modelId}
/
git
Update git configuration
curl --request PATCH \
  --url https://{instance}.omniapp.co/api/v1/models/{modelId}/git \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "baseBranch": "develop",
  "requirePullRequest": "always"
}
'
{
  "baseBranch": "develop",
  "branchPerPullRequest": false,
  "gitFollower": false,
  "gitServiceProvider": "github",
  "modelPath": "omni/my_model",
  "publicKey": "ssh-ed25519 AAAA...",
  "requirePullRequest": "always",
  "sshUrl": "[email protected]:org/repo.git",
  "webUrl": "https://github.com/org/repo",
  "webhookUrl": "https://app.omni.co/api/webhooks/model/..."
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

modelId
string<uuid>
required

The unique identifier of the shared model.

Body

application/json
sshUrl
string

The SSH URL of the git repository.

Example:

"[email protected]:org/repo.git"

baseBranch
string

The target branch for Omni pull requests.

Example:

"main"

branchPerPullRequest
boolean

If true, all pull requests will create a branch in Omni, even those created outside of the tool.

Example:

false

gitFollower
boolean

If true, the shared model is read-only and can only be updated by merging pull requests to the baseBranch.

Example:

false

gitServiceProvider
enum<string>

The git provider type. Use auto for automatic detection based on the SSH URL.

  • auto - Automatically detect the provider
  • github - GitHub
  • gitlab - GitLab
  • azure_devops - Azure DevOps
  • bitbucket - Bitbucket
Available options:
auto,
github,
gitlab,
azure_devops,
bitbucket
Example:

"github"

modelPath
string

Path to model files within the repository.

Example:

"omni/blobs_r_us"

requirePullRequest
enum<string>

Controls when pull requests are required for changes:

  • always - Pull requests are required for all changes
  • users-only - Pull requests are required only for user-initiated changes
  • never - Pull requests are never required
Available options:
always,
users-only,
never
Example:

"users-only"

webUrl
string

Custom web URL override for the git repository.

Example:

"https://github.com/org/repo"

Response

Git configuration updated successfully

baseBranch
string

The target branch for Omni pull requests.

Example:

"main"

branchPerPullRequest
boolean

If true, all pull requests will create a branch in Omni, even those created outside of the tool.

Example:

false

gitFollower
boolean

If true, the shared model is read-only and can only be updated by merging pull requests to the base branch.

Example:

false

gitServiceProvider
enum<string>

The git provider type.

  • github - GitHub
  • gitlab - GitLab
  • azure_devops - Azure DevOps
  • bitbucket - Bitbucket
Available options:
github,
gitlab,
azure_devops,
bitbucket
Example:

"github"

modelPath
string | null

Path to model files in the repository.

Example:

"omni/blobs_r_us"

publicKey
string

SSH public key for repository access (deploy key).

Example:

"ssh-ed25519 AAAA..."

requirePullRequest
enum<string>

Controls when pull requests are required for changes:

  • always - Required for all changes
  • users-only - Required only for user-initiated changes
  • never - Never required
Available options:
always,
users-only,
never
Example:

"users-only"

sshUrl
string

SSH URL of the git repository.

Example:

"[email protected]:org/repo.git"

webUrl
string | null

Custom web URL for the git repository, or null if not set.

Example:

"https://github.com/org/repo"

webhookSecret
string

Webhook secret for signature verification. Only included if requested via ?include=webhookSecret.

webhookUrl
string

Webhook URL to configure in your git provider.

Example:

"https://app.omni.co/api/webhooks/model/..."