Lightdash Organization Roles API

The Organization Roles API from Lightdash — 5 operation(s) for organization roles.

Business capability
Identity & Access Management BC-620.20

Operations 7

GET /api/v2/orgs/{orgUuid}/roles Get organization roles #
GET /api/v2/orgs/{orgUuid}/roles/{roleUuid} Get custom role #
GET /api/v2/orgs/{orgUuid}/roles/assignments List organization role assignments #
POST /api/v2/orgs/{orgUuid}/roles/assignments/user/{userId} Assign organization role to user #
GET /api/v2/orgs/{orgUuid}/roles/assignments/user/{userId}/set Get organization role set for user #
PUT /api/v2/orgs/{orgUuid}/roles/assignments/user/{userId}/set Replace organization role set for user #
POST /api/v2/orgs/{orgUuid}/roles/{roleId}/duplicate Duplicate role #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightdash:lightdash-organization-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightdash-organization-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lightdash Organization Roles API
  version: 2.616.2
  description: 'Open API documentation for all public Lightdash API endpoints. # Authentication Before you get started, you might need to create a Personal Access Token to authenticate via the API. You can create a token by following this guide: https://docs.lightdash.com/references/personal_tokens'
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
- url: /
tags:
- name: Organization Roles
paths:
  /api/v2/orgs/{orgUuid}/roles:
    get:
      operationId: GetOrganizationRoles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ApiGetRolesResponse'
                - $ref: '#/components/schemas/ApiRoleWithScopesResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Get roles for organization
      summary: Get organization roles
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: query
        name: load
        required: false
        schema:
          type: string
      - in: query
        name: roleTypeFilter
        required: false
        schema:
          type: string
  /api/v2/orgs/{orgUuid}/roles/{roleUuid}:
    get:
      operationId: GetCustomRoleByUuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRoleWithScopesResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Get custom role by uuid
      summary: Get custom role
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: path
        name: roleUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
  /api/v2/orgs/{orgUuid}/roles/assignments:
    get:
      operationId: GetOrganizationRoleAssignments
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRoleAssignmentListResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      summary: List organization role assignments
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
  /api/v2/orgs/{orgUuid}/roles/assignments/user/{userId}:
    post:
      operationId: UpsertOrganizationUserRoleAssignment
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRoleAssignmentResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Assign system or organization-level custom role to user at organization level
      summary: Assign organization role to user
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: path
        name: userId
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                roleId:
                  type: string
              required:
              - roleId
              type: object
  /api/v2/orgs/{orgUuid}/roles/assignments/user/{userId}/set:
    get:
      operationId: GetOrganizationUserRoleSet
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOrganizationRoleSetResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: 'Get the complete role set (system role plus custom roles) a user holds in the organization.

        Requires custom roles (Enterprise).'
      summary: Get organization role set for user
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: path
        name: userId
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
    put:
      operationId: ReplaceOrganizationUserRoleSet
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOrganizationRoleSetResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: 'Atomically replace the complete role set a user holds in the organization.

        At most one system role plus any number of custom roles; the set must not be empty.

        Requires custom roles (Enterprise).'
      summary: Replace organization role set for user
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: path
        name: userId
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationRoleSet'
  /api/v2/orgs/{orgUuid}/roles/{roleId}/duplicate:
    post:
      operationId: DuplicateRole
      responses:
        '201':
          description: Role duplicated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRoleWithScopesResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Duplicate a role
      summary: Duplicate role
      tags:
      - Organization Roles
      security: []
      parameters:
      - in: path
        name: orgUuid
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - in: path
        name: roleId
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRole'
components:
  schemas:
    CreateRole:
      properties:
        scopes:
          items:
            type: string
          type: array
        level:
          $ref: '#/components/schemas/RoleLevel'
        description:
          type: string
        name:
          type: string
      required:
      - name
      type: object
    RoleWithScopes:
      allOf:
      - $ref: '#/components/schemas/Role'
      - properties:
          scopes:
            items:
              type: string
            type: array
        required:
        - scopes
        type: object
    ApiOrganizationRoleSetResponse:
      properties:
        results:
          $ref: '#/components/schemas/OrganizationRoleSet'
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
    RoleAssignment:
      properties:
        hasMultipleRoles:
          type: boolean
          description: True when the assignee holds extra custom roles beyond `roleId` (see role sets).
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        projectId:
          type: string
        organizationId:
          type: string
        assigneeName:
          type: string
        assigneeId:
          type: string
        assigneeType:
          type: string
          enum:
          - user
          - group
        ownerType:
          type: string
          enum:
          - user
          - system
        roleName:
          type: string
        roleId:
          type: string
      required:
      - updatedAt
      - createdAt
      - assigneeName
      - assigneeId
      - assigneeType
      - ownerType
      - roleName
      - roleId
      type: object
    AnyType:
      description: 'This AnyType is an alias for any

        The goal is to make it easier to identify any type in the codebase

        without having to eslint-disable all the time

        These are only used on legacy `any` types, don''t use it for new types.

        This is added on a separate file to avoid circular dependencies.'
    ApiGetRolesResponse:
      properties:
        results:
          anyOf:
          - items:
              $ref: '#/components/schemas/Role'
            type: array
          - items:
              $ref: '#/components/schemas/RoleWithScopes'
            type: array
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
    OrganizationMemberRole:
      enum:
      - member
      - viewer
      - interactive_viewer
      - editor
      - developer
      - admin
      type: string
    UUID:
      type: string
      format: uuid
      description: 'Stringified UUIDv4.

        See [RFC 4112](https://tools.ietf.org/html/rfc4122)'
      pattern: '[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}'
    ApiRoleAssignmentListResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          type: array
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
    RoleLevel:
      type: string
      enum:
      - project
      - organization
    ApiRoleWithScopesResponse:
      properties:
        results:
          $ref: '#/components/schemas/RoleWithScopes'
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
          - name
          - statusCode
          type: object
        status:
          type: string
          enum:
          - error
      required:
      - error
      - status
      type: object
      description: 'The Error object is returned from the api any time there is an error.

        The message contains'
    Role:
      properties:
        updatedAt:
          type:
          - string
          - 'null'
          format: date-time
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
        createdBy:
          type:
          - string
          - 'null'
        ownerType:
          type: string
          enum:
          - user
          - system
        organizationUuid:
          type:
          - string
          - 'null'
        level:
          $ref: '#/components/schemas/RoleLevel'
        description:
          type:
          - string
          - 'null'
        name:
          type: string
        roleUuid:
          type: string
      required:
      - updatedAt
      - createdAt
      - createdBy
      - ownerType
      - organizationUuid
      - level
      - description
      - name
      - roleUuid
      type: object
    OrganizationRoleSet:
      properties:
        customRoleUuids:
          items:
            type: string
          type: array
        systemRole:
          allOf:
          - $ref: '#/components/schemas/OrganizationMemberRole'
      required:
      - customRoleUuids
      - systemRole
      type: object
      description: 'Complete set of roles held at one level: at most one system role plus any

        number of custom roles. Permissions are the union of all held roles.'
    ApiRoleAssignmentResponse:
      properties:
        results:
          $ref: '#/components/schemas/RoleAssignment'
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
  securitySchemes:
    session_cookie:
      type: apiKey
      in: cookie
      name: connect.sid
    api_key:
      type: apiKey
      in: header
      name: Authorization
      description: Value should be 'ApiKey <your key>'
x-provenance:
  method: harvested
  publisher: Lightdash
  source: https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)