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 POST \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/yaml \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"yaml": "<string>",
"mode": "combined",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commitMessage": "<string>",
"previousChecksum": "<string>",
"fullyResolved": false
}
'{
"fileName": "<string>",
"success": true
}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:
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/yaml \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"yaml": "<string>",
"mode": "combined",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commitMessage": "<string>",
"previousChecksum": "<string>",
"fullyResolved": false
}
'{
"fileName": "<string>",
"success": true
}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 ID of the model.
The name of the YAML file. Valid values are:
model - Model filerelationships - Relationships file<topic_name>.topic - Topic file<view_name>.view - View fileThe YAML contents of the file. This can be empty, in which case:
mode: extension the file will be removed from the modelmode: combined, the file will be ignored in the modelThe 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.
Was this page helpful?