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 PATCH \
--url https://{instance}.omniapp.co/api/v1/models/{modelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "customer_metrics_v2"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modelKind": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}Renames a model by updating its name. This endpoint allows you to programmatically rename models without using the UI, which is particularly useful for bulk operations on shared extension models created via POST /api/v1/models.
Supported model kinds:
SCHEMA - Schema modelsSHARED - Shared modelsSHARED_EXTENSION - Shared extension modelsBRANCH - Branch modelsWorkbook models and query models cannot be renamed via this endpoint and will return a 400 error.
Authorization:
SCHEMA models: requires MANAGE_MODEL permissionUPDATE permissionUniqueness constraints:
The new name must be unique among active models with the same modelKind and baseModelId.
Branch-specific constraints:
[\w\-/]+team if team/project exists)pullRequestUrl is set) — renaming would desync Omni from the git remotecurl --request PATCH \
--url https://{instance}.omniapp.co/api/v1/models/{modelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "customer_metrics_v2"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modelKind": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}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
ID of the model to rename.
The new name for the model.
"customer_metrics_v2"
Model renamed successfully
ID of the model.
ID of the base model, if applicable.
ID of the connection the model is based on.
The type of model.
The name of the model.
The time the model was created.
The time the model was last updated.
The time the model was deleted, if applicable.
Was this page helpful?