Models

Get git configuration

get/api/v1/models/{modelId}/git

Path parameters

modelIdstring uuid required

Model UUID

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

Model UUID

Query parameters

includestring

Comma-separated list of optional fields to include. Supported: "webhookSecret"

Example:webhookSecret

Comma-separated list of optional fields to include. Supported: "webhookSecret"

Response

Git configuration for the model

authMethod'ssh' | 'https_token' required

Authentication method. "ssh" for deploy key, "https_token" for deploy token/PAT.

baseBranchstring required

The target branch for Omni pull requests

branchPerPullRequestboolean required

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

cloneUrlstring required

Clone URL of the git repository (SSH or HTTPS)

gitFollowerboolean required

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

gitServiceProviderstring required

The git provider type

modelPathstring nullable required

Path to model files in the repository

publicKeystring nullable required

SSH public key for repository access (deploy key). Null for HTTPS token auth.

requirePullRequest'always' | 'users-only' | 'never' required

When pull requests are required: "always" for all changes, "users-only" for user-initiated changes only, "never" for direct commits.

sshUrlstring required

Deprecated — use cloneUrl. Clone URL of the git repository.

webUrlstring nullable required

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

webhookSecretstring

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

webhookUrlstring required

Webhook URL to configure in your git provider

Example response

{
  "authMethod": "ssh",
  "baseBranch": "main",
  "cloneUrl": "git@github.com:org/repo.git",
  "gitServiceProvider": "github",
  "modelPath": "omni/my_model",
  "publicKey": "ssh-ed25519 AAAA...",
  "requirePullRequest": "users-only",
  "webUrl": "https://github.com/org/repo",
  "webhookUrl": "https://app.omni.co/api/webhooks/model/..."
}

Changes