v4

latestOpenAPI 3.1.02026-08-01207318738.7 KB
Models

Create git configuration

Create git configuration for a model. For SSH auth, Omni generates a deploy keypair by default; supply deployPrivateKey (with deployKeyPassphrase for encrypted keys) to bring your own instead.

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

Path parameters

modelIdstring uuid required

Model UUID

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

Model UUID

Request body

authMethod'ssh' | 'https_token' | 'github_app'

Authentication method. "ssh" for deploy key (default), "https_token" for deploy token/PAT, "github_app" for a GitHub App installation (github.com only).

baseBranchstring

The target branch for Omni pull requests. Defaults to "main"

branchPerPullRequestboolean

If true, all pull requests will create a branch in Omni. Defaults to false

cloneUrlstring

Clone URL of the git repository. SSH (git@...) for deploy key auth, HTTPS (https://...) for token or GitHub App auth.

commitSigningCommitterEmailstring email nullable

Verified email of the GitHub user that owns the registered signing key, written into signed commits (github_app auth only). Send a string to set it, null to clear it (disabling signing), or omit it to leave the stored value unchanged. Must be set, cleared, or omitted together with commitSigningCommitterName.

commitSigningCommitterNamestring nullable

Display name written into signed commits (github_app auth only). Send a string to set it, null to clear it (disabling signing), or omit it to leave the stored value unchanged. Must be set, cleared, or omitted together with commitSigningCommitterEmail.

deployKeyPassphrasestring

Passphrase for deployPrivateKey when it is encrypted. Omni uses it once to decrypt the key, then stores the key under its own encryption at rest; the passphrase itself is not retained.

deployPrivateKeystring

Bring-your-own SSH deploy private key in PEM format (RSA or ED25519, as produced by ssh-keygen), used instead of an Omni-generated keypair. On update it replaces the current key, enabling zero-downtime rotation: authorize the matching public key with your git provider first, then set it here. Only valid for SSH auth.

gitFollowerboolean

If true, the shared model will be read-only. Defaults to false

gitServiceProvider'github' | 'gitlab' | 'azure_devops' | 'bitbucket' | 'bitbucket_datacenter' | 'auto'

The git provider type. Use "auto" for automatic detection. Defaults to "auto"

githubAppInstallationIdstring

Numeric GitHub App installation ID (the value in the URL after installing the Omni GitHub App on the repo). Required when authMethod is "github_app".

modelPathstring

Path to model files in the repository. Defaults to omni/<model-name>. Use a plain name (e.g., "my_model") for omni/my_model, or a leading slash for a custom path (e.g., "/bi/models/sales")

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

Controls when pull requests are required. Defaults to "never"

sshUrlstring

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

tokenstring

HTTPS token for authentication (deploy token value, PAT, etc.). Required when authMethod is "https_token".

webUrlstring

Custom web URL for the git repository. Use when the clone URL goes through a tunnel/VPC and differs from the inferred HTTPS address

Example request

{
  "authMethod": "ssh",
  "baseBranch": "main",
  "cloneUrl": "git@github.com:org/repo.git",
  "commitSigningCommitterEmail": "omni-bot@example.com",
  "commitSigningCommitterName": "Omni Bot",
  "gitServiceProvider": "auto",
  "githubAppInstallationId": "12345678",
  "modelPath": "my_model",
  "requirePullRequest": "never",
  "sshUrl": "git@github.com:org/repo.git",
  "webUrl": "https://github.com/org/repo"
}

Response

Git configuration created

authMethod'ssh' | 'https_token' | 'github_app' required

Authentication method. "ssh" for deploy key, "https_token" for deploy token/PAT, "github_app" for a GitHub App installation.

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)

commitSigningCommitterEmailstring nullable required

Committer email written into signed commits. Null unless github_app auth with signing configured.

commitSigningCommitterNamestring nullable required

Committer name written into signed commits. Null unless github_app auth with signing configured.

commitSigningPublicKeystring nullable required

SSH signing public key to register on GitHub (Settings → SSH and GPG keys → Signing Key) so Omni’s commits show as Verified. Null unless github_app auth.

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

githubAppInstallationIdstring nullable required

GitHub App installation ID. Null unless github_app auth.

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",
  "commitSigningPublicKey": "ssh-ed25519 AAAA...",
  "gitServiceProvider": "github",
  "githubAppInstallationId": "12345678",
  "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/..."
}