Create or update YAML files
Creates or overwrites a YAML file for a model. The file can be a special file (model or relationships) or a YAML file ending in .topic or .view.
The following models cannot be edited using this endpoint:
- Schema models
- Models using git follower mode
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The ID of the model.
Body
The name of the YAML file. Valid values are:
model- Model filerelationships- Relationships file<topic_name>.topic- Topic file<view_name>.view- View file
The YAML contents of the file. This can be empty, in which case:
- If empty and used with
mode: extensionthe file will be removed from the model - If empty and used with
mode: combined, the file will be ignored in the model
The mode to use when creating or overwriting the YAML file.
Note: Workbook models must use combined mode if there is a branchId.
combined, extension, staged, merged, history Required if git pull requests are required for the model. The ID of the branch to create or update. To retrieve branch IDs, use the List models endpoint with modelKind=BRANCH.
Required for git-enabled models. Commit message describing the change.
Checksum of the file when fetched, for conflict detection. Obtain this value from the Get model YAML endpoint by including the includeChecksums parameter.
If the file has been modified since you fetched it, the request will fail with a File has been modified since it was fetched error.
If true, accepts fully-resolved YAML. This means that Omni will resolve any extension (extends) usage and place the changes into the appropriate model files.
When false (default), the YAML is saved as-is to the specified file. This means that even if extensions are used, they will not be included in the changes.