Need help? Get answers from the docs with Omni's in-app AI! Log in to your Omni instance and open the Omni Agent in the sidebar.
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": {}
}Retrieves the YAML representation of a model with optional filtering and mode selection.
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.
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
The unique identifier of the model.
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.
Filter YAML files by name. Can be a string or a regex pattern.
The mode to use when retrieving YAML.
extension - Returns extension-only formatstaged - Returns staged changescombined - Returns combined YAMLextension, staged, combined 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.
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.
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.
Was this page helpful?