Skip to main content
GET
/
v1
/
models
/
{modelId}
/
yaml
Get model YAML
curl --request GET \
  --url https://{instance}.omniapp.co/api/v1/models/{modelId}/yaml \
  --header 'Authorization: Bearer <token>'
{
  "files": {
    "model.yaml": "name: Test Model\ntype: model",
    "views/customers.yaml": "name: Customers\nfields: []",
    "views/orders.yaml": "name: Orders\nfields: []"
  },
  "version": 1,
  "viewNames": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.omni.co/llms.txt

Use this file to discover all available pages before exploring further.

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 model.

Query Parameters

branchId
string<uuid>

The ID of the branch to retrieve YAML from. Only valid for shared models in combined mode. To retrieve branch IDs, use the List models endpoint with modelKind=BRANCH.

fileName
string

Filter YAML files by name. Can be a string or a regex pattern.

mode
enum<string>
default:combined

The mode to use when retrieving YAML.

  • extension - Returns extension-only format
  • staged - Returns staged changes
  • combined - Returns combined YAML
Available options:
extension,
staged,
combined
includeChecksums
boolean
default:false

If true, the response will include file checksums for concurrency control.

A file's checksum can be passed as a query parameter in the Create or update YAML endpoint to ensure changes made by another user aren't overwritten.

includeSchemas
string

Filters the returned YAML to only include views from the specified schema. Relationships are preserved even if they reference views outside the specified schema.

This parameter accepts a single schema name only. Use the List model schemas endpoint to discover available schema names.

fullyResolved
boolean
default:false

If true, returns YAML with any extensions (extends) resolved. This will match what runs at query time.

When false (default), returns the YAML as authored in the model files. This means even if extensions are used, they will not be included in the returned YAML.

Response

Model YAML specification

files
object

Map of file paths to YAML content.

version
integer

Version of the YAML.

viewNames
object

Map of view names to their definitions.

checksums
object

Map of file paths to their checksums.