v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
Model Git configuration

Create Git configuration

Create a new Git configuration for a shared model.

post/v1/models/{modelId}/git

Path parameters

modelIdstring uuid required

The unique identifier of the shared model.

Request body

authMethod'ssh' | 'https_token'

The authentication method to use:

  • ssh for deploy key
  • https_token for deploy token/PAT
cloneUrlstring required

Clone URL of the git repository. Varies depending on the authMethod:

  • ssh - A string starting with git@...
  • https_token - A string starting with https://...
sshUrlstring

Deprecated. Use cloneUrl instead. The SSH URL of the git repository.

tokenstring

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

baseBranchstring

The target branch for Omni pull requests.

branchPerPullRequestboolean

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

gitFollowerboolean

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

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

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 Cloud
  • bitbucket_datacenter - Bitbucket Data Center (self-hosted)
modelPathstring

Path to model files within the repository.

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

Controls when pull requests are required for changes:

  • always - Required for all changes
  • users-only - Required only for user-initiated changes
  • never - Never required
webUrlstring

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

deployPrivateKeystring

Applicable to SSH authentication. Supply your own RSA or ED25519 private key in PEM format (OpenSSH, PKCS#1, or PKCS#8) instead of using an Omni-generated keypair. Authorize the matching public key with your first, then set it here. See Rotate Git SSH keys with the API for step-by-step instructions.

deployKeyPassphrasestring

Applicable to SSH authentication. Passphrase used to decrypt an encrypted deployPrivateKey. Omni uses it once to decrypt the key, then stores the key under its own encryption at rest. The passphrase itself is not retained. See Rotate Git SSH keys with the API for step-by-step instructions.

Example request

{
  "authMethod": "ssh",
  "cloneUrl": "git@github.com:org/repo.git",
  "sshUrl": "git@github.com:org/repo.git",
  "baseBranch": "main",
  "gitServiceProvider": "github",
  "modelPath": "omni/blobs_r_us",
  "requirePullRequest": "users-only",
  "webUrl": "https://github.com/org/repo",
  "deployPrivateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n...",
  "deployKeyPassphrase": "my-secure-passphrase"
}

Response

Git configuration created successfully

authMethod'ssh' | 'https_token'

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

cloneUrlstring

Clone URL of the git repository (SSH or HTTPS)

baseBranchstring

The target branch for Omni pull requests.

branchPerPullRequestboolean

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

gitFollowerboolean

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

gitServiceProvider'github' | 'gitlab' | 'azure_devops' | 'bitbucket'

The git provider type.

  • github - GitHub
  • gitlab - GitLab
  • azure_devops - Azure DevOps
  • bitbucket - Bitbucket
modelPathstring nullable

Path to model files in the repository.

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

Controls when pull requests are required for changes:

  • always - Required for all changes
  • users-only - Required only for user-initiated changes
  • never - Never required
sshUrlstring

Deprecated. Use cloneUrl instead. SSH URL of the git repository.

webUrlstring nullable

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

Webhook URL to configure in your git provider.

Example response

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