---
title: "Get model YAML"
method: GET
path: "/v1/models/{modelId}/yaml"
tags: ["Models"]
---

# Get model YAML

`GET /v1/models/{modelId}/yaml`

Retrieve the YAML representation of a model with optional filtering and mode selection.

## Path parameters

- `modelId` string, uuid, required

## Query parameters

- `branchId` string, uuid
- `fileName` string
- `mode` 'extension' | 'staged' | 'combined'
- `includeChecksums` boolean
- `includeSchemas` string
- `fullyResolved` boolean

## Response `200`

Model YAML specification

- object
  - `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.

## Other responses

- `400` — Bad Request Possible error messages: - `Schema models do not have branches` - `Branches are not valid for workbook models with mode=extension, staged`
- `403` — Forbidden Possible error messages: - `Permission denied` - `Feature not enabled`
- `404` — Not Found Possible error messages: - `Model with id <modelId> does not exist` - `Branch does not exist`
- `405` — Method Not Allowed - Invalid HTTP method for this endpoint
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500` — Internal Server Error Possible error messages: - `Failed to get model YAML`

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
