Skip to main content
GET
/
unstable
/
models
/
{modelId}
/
yaml
Get model YAML
curl --request GET \
  --url https://{instance}.omniapp.co/api/unstable/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": {}
}
This API is in beta and may have future breaking changes.

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.

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.

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.