Skip to main content
GET
/
v1
/
users
/
{userId}
/
model-roles
Retrieve user model roles
curl --request GET \
  --url https://{instance}.omniapp.co/api/v1/users/{userId}/model-roles \
  --header 'Authorization: Bearer <token>'
{
  "membershipId": "9633bd79-7bdf-4773-8952-8fdd4098e51c",
  "results": [
    {
      "baseRole": "MODELER",
      "from": {
        "type": "User Role"
      },
      "priority": 350,
      "resolved": true,
      "roleName": "MODELER",
      "connectionId": "8a464dc9-1f0e-4a9e-86fa-e1e6d970157c",
      "modelId": "5fb90312-67b1-4cca-823a-9a341d549320"
    },
    {
      "baseRole": "QUERIER",
      "from": {
        "depth": 0,
        "miniUuid": "PgjffoEu",
        "name": "Super Group",
        "type": "Group Role"
      },
      "priority": 250,
      "resolved": false,
      "roleName": "QUERIER",
      "connectionId": "8a464dc9-1f0e-4a9e-86fa-e1e6d970157c",
      "modelId": "5fb90312-67b1-4cca-823a-9a341d549320"
    },
    {
      "baseRole": "VIEWER",
      "from": {
        "type": "Connection Base Role"
      },
      "priority": 50,
      "resolved": false,
      "roleName": "VIEWER",
      "connectionId": "8a464dc9-1f0e-4a9e-86fa-e1e6d970157c",
      "modelId": "5fb90312-67b1-4cca-823a-9a341d549320"
    }
  ]
}

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

userId
string<uuid>
required

The ID of the user to retrieve model roles for.

Query Parameters

modelId
string<uuid>

Filter results to a specific model ID. If not provided, returns roles for all models the user has access to.

connectionId
string<uuid>

Filter results to models from a specific connection. If not provided, returns roles for all connections.

Response

User model roles retrieved successfully.

membershipId
string<uuid>

The ID of the user's membership in the organization.

results
object[]

Array of all role assignments for the user, including direct assignments, roles inherited from user groups, and connection base roles.