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/user-groups/{userGroupId}/model-roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"modelId": "7d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
"roleName": "QUERIER"
}
'{
"userGroupId": "mEhXj6ZI",
"connectionId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"modelId": "7d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
"roleName": "QUERIER"
}Assigns or updates a model role for a user group. If the user group already has a role for the specified model, this endpoint will update it to the new role. All members of the user group will inherit this role.
Model roles control what actions user group members can perform on models and connections. To manage user groups, see the User group APIs.
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/user-groups/{userGroupId}/model-roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"modelId": "7d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
"roleName": "QUERIER"
}
'{
"userGroupId": "mEhXj6ZI",
"connectionId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"modelId": "7d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
"roleName": "QUERIER"
}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 user group to assign or update a model role for.
The role to assign. Available roles include:
VIEWER - Can view the modelQUERIER - Can view and query the modelQUERY_TOPICS - Can query specific topics. Equivalent to Restricted Querier.MODELER - Can edit and model the dataCONNECTION_ADMIN - Full administrative access to the connectionNO_ACCESS - No access to the modelThe ID of the connection that the model belongs to:
modelId is not providedmodelId is provided, as it will be inferred from the modelThe ID of the model to assign the role for:
CONNECTION_ADMIN or custom roles with CONNECTION_ADMIN as the base roleWas this page helpful?