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/users/{userId}/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"
}
'{
"userId": "9e8719d9-276a-4964-9395-a493189a247c",
"connectionId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"modelId": "7d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
"roleName": "QUERIER"
}Assigns or updates a model role for a user. If the user already has a role for the specified model, this endpoint will update it to the new role.
Model roles control what actions a user can perform on models and connections. To manage users, see the User APIs.
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/users/{userId}/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"
}
'{
"userId": "9e8719d9-276a-4964-9395-a493189a247c",
"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 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, in which case 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?