Skip to main content
POST
/
v1
/
user-groups
/
{userGroupId}
/
model-roles
Assign or update user group model role
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.

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

userGroupId
string
required

The ID of the user group to assign or update a model role for.

Body

application/json
roleName
string
required

The role to assign. Available roles include:

  • VIEWER - Can view the model
  • QUERIER - Can view and query the model
  • QUERY_TOPICS - Can query specific topics. Equivalent to Restricted Querier.
  • MODELER - Can edit and model the data
  • CONNECTION_ADMIN - Full administrative access to the connection
  • NO_ACCESS - No access to the model
  • Custom roles defined for your organization
connectionId
string<uuid>

The ID of the connection that the model belongs to:

  • Required if modelId is not provided
  • Optional if modelId is provided, as it will be inferred from the model
modelId
string<uuid>

The ID of the model to assign the role for:

  • Optional when assigning CONNECTION_ADMIN or custom roles with CONNECTION_ADMIN as the base role
  • Required for other role types

Response

Model role assigned or updated successfully.

userGroupId
string

The ID of the user group.

connectionId
string<uuid>

The ID of the connection.

modelId
string<uuid>

The ID of the model.

roleName
string

The assigned role name.