> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cantina.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieves a list of repository users accessible to the current logged-in user.

> Admins, company users, judges and triagers can see all users that are part
of the repository, except for admins.

Reviewers can see all judges, triagers, company users and their team mates.
Compared to the above, they are not able to see all reviewers.

# Access control rules

- The requester must have access to the repository.



## OpenAPI

````yaml GET /api/v0/repositories/{repo_id}/users
openapi: 3.1.0
info:
  title: Cantina Client API
  description: >-
    Endpoints available to client organizations. For an overview and
    authentication, see
    https://docs.cantina.xyz/for-organizations/getting-started/api-access.
  license:
    name: Cantina
    identifier: Cantina
  version: 0.1.0
servers: []
security: []
paths:
  /api/v0/repositories/{repo_id}/users:
    get:
      tags:
        - repositories
      summary: >-
        Retrieves a list of repository users accessible to the current logged-in
        user.
      description: >-
        Admins, company users, judges and triagers can see all users that are
        part

        of the repository, except for admins.


        Reviewers can see all judges, triagers, company users and their team
        mates.

        Compared to the above, they are not able to see all reviewers.


        # Access control rules


        - The requester must have access to the repository.
      operationId: list_repo_users
      parameters:
        - name: made_comment
          in: query
          description: >-
            Filter the users to only those that made a file or finding comment.


            Defaults to include all users (even those who didn't make a
            comment).
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: name
          in: query
          description: >-
            Filter the users by name (search).


            Searches based on username and name (as not all users have a
            username).


            Defaults to no filtering.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: role
          in: query
          description: Filter by role the user has in the repository.
          required: false
          schema:
            oneOf:
              - type: 'null'
              - $ref: '#/components/schemas/RepositoryRole'
        - name: include_deleted
          in: query
          description: |-
            If true include deleted and disabled users.

            Defaults to false, i.e. disabled users and users deleted from the
            repository are not included.
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: repo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of repository users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoUserList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '401':
          description: Access not authorised
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '500':
          description: Error getting users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
components:
  schemas:
    RepositoryRole:
      type: string
      description: Role of a user in the context of a repository.
      enum:
        - client
        - reviewer
        - judge
        - triager
        - admin
    RepoUserList:
      type: object
      description: List of repository users.
      required:
        - users
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/RepositoryUser'
          description: |-
            The repository users.
            Note that only reviewers, judges and triagers are returned. Company
            users and admins are not included.
    CantinaError:
      type: object
      description: Error returned by the Cantina API.
      required:
        - type
        - msg
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        msg:
          type: string
          description: Error message for the user.
    RepositoryUser:
      type: object
      description: User data in the context of a repository.
      required:
        - userId
        - name
        - username
        - repositoryRole
        - avatar
        - isBot
        - createdAt
      properties:
        userId:
          type: string
          format: uuid
          description: User id, not to be confused with a client id.
        name:
          type: string
        username:
          type: string
        teamId:
          type:
            - string
            - 'null'
          format: uuid
          description: |-
            Id of the team the reviewer is a part of.

            For non-reviewers, this will be null.
        pingsLeft:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Number of times the reviewer can ping the client.


            Visible to admins, company users, and reviewers only when viewing
            their own info.


            For non-reviewers, this will be null.
        reputation:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Reputation of an auditor, always in the range of `0..=100`.


            Visible to admins, clients, judges and triagers only. Only returned
            in the

            finding's creator field (`Finding.created_by.reputation`), not in
            other

            places.


            For non-reviewers, this will be null.
        repositoryRole:
          $ref: '#/components/schemas/RepositoryRole'
        avatar:
          type: string
        isBot:
          type: boolean
        createdAt:
          type: string
          format: date-time
        disabledAt:
          type:
            - string
            - 'null'
          format: date-time
          description: User is disabled and doesn't have access to Cantina any more.
        deletedFromRepoAt:
          type:
            - string
            - 'null'
          format: date-time
          description: User is deleted from the repository.
    ErrorType:
      type: string
      description: Type of error.
      enum:
        - email_not_verified
        - auth_invalid
        - auth_expired
        - auth_token_missing
        - auth_id_missing
        - invalid_password
        - disabled_user
        - tc_not_accepted
        - evicted
        - unauthorized
        - bad_request
        - not_found
        - forbidden
        - gone
        - payload_too_large
        - service_unavailable
        - internal_error

````