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

# ユーザー一覧の取得

> ユーザー一覧を取得します。



## OpenAPI

````yaml get /users
openapi: 3.0.0
info:
  title: Rheel Chat Client API
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: |-
    RheelのChat API (Client版) 仕様です。

    このAPIはJWT認証（UserSessionAuth）を使用するクライアント向けのエンドポイントを提供します。
    すべてのエンドポイントは `/client` プレフィックスを持ち、セッショントークンによる認証が必要です。

    ## 認証方式
    - **JWT認証（Bearer Token）**: セッショントークン発行のエンドポイントを介して取得したセッショントークンを
    Authorizationヘッダーに `Bearer {token}` 形式で指定します。

    ## WebSocketについて
    このサービスでは、メッセージや通知をリアルタイムに受信するために WebSocket通信を提供しています。
    接続先は以下のURLです: `wss://<application_id>.chat.rheel.net/v1/ws`
servers:
  - url: https://<application_id>.chat.rheel.net/client/v1
    description: 本番サーバー
    variables:
      application_id:
        default: YOUR_APP_ID（RheelチャットインスタンスのアプリケーションID）
security: []
tags:
  - name: Client Channels
  - name: Client Messages
  - name: Client Users
paths:
  /users:
    get:
      tags:
        - Client Users
      summary: ユーザー一覧の取得
      description: ユーザー一覧を取得します。
      operationId: ClientUsers_getUsers
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 20
          explode: false
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 0
          explode: false
      responses:
        '200':
          description: ユーザー一覧取得のレスポンス
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: array
                    items:
                      $ref: '#/components/schemas/Users.User'
                    description: ユーザーの一覧
                  totalCount:
                    type: integer
                    format: int32
                    description: 総件数
                required:
                  - users
                  - totalCount
        '400':
          description: 入力内容が不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error.BadRequestError'
        '401':
          description: 認証に失敗しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error.UnauthorizedError'
        '403':
          description: アクセス権がありません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error.ForbiddenError'
        '404':
          description: リソースが存在しません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error.NotFoundError'
        '500':
          description: サーバーでエラーが発生しました。時間をおいて再度お試しください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error.InternalServerError'
      security:
        - UserSessionAuth: []
components:
  schemas:
    Users.User:
      type: object
      required:
        - id
        - display_name
        - role
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/UserId'
          description: ユーザーの一意な識別子（ユーザー作成時に任意のidを指定できます）
        display_name:
          type: string
          minLength: 1
          maxLength: 200
          description: ユーザーの表示名
        icon_url:
          type: string
          nullable: true
          description: ユーザーアイコンのURL
        role:
          allOf:
            - $ref: '#/components/schemas/Users.UserRole'
          description: ユーザーの権限・役割(Admin:管理者, Member:一般ユーザー)
        created_at:
          type: string
          format: date-time
          description: 作成日時
          readOnly: true
        updated_at:
          type: string
          format: date-time
          nullable: true
          description: 更新日時
          readOnly: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: 削除日時
          readOnly: true
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: 任意の追加メタデータ
    Error.BadRequestError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - BAD_REQUEST
            errors:
              type: array
              items:
                $ref: '#/components/schemas/Error.ValidationError'
          required:
            - message
            - code
      allOf:
        - $ref: '#/components/schemas/TypeSpec.Http.BadRequestResponse'
      description: 入力内容が不正です
    Error.UnauthorizedError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - UNAUTHORIZED
          required:
            - message
            - code
      allOf:
        - $ref: '#/components/schemas/TypeSpec.Http.UnauthorizedResponse'
      description: 認証に失敗しました
    Error.ForbiddenError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - FORBIDDEN
          required:
            - message
            - code
      allOf:
        - $ref: '#/components/schemas/TypeSpec.Http.ForbiddenResponse'
      description: アクセス権がありません
    Error.NotFoundError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - NOT_FOUND
          required:
            - message
            - code
      allOf:
        - $ref: '#/components/schemas/TypeSpec.Http.NotFoundResponse'
      description: リソースが存在しません
    Error.InternalServerError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - INTERNAL_SERVER_ERROR
          required:
            - message
            - code
      allOf:
        - type: object
          description: ''
      description: サーバーでエラーが発生しました。時間をおいて再度お試しください。
    UserId:
      type: string
      minLength: 1
      maxLength: 100
      pattern: ^[a-zA-Z0-9_-]+$
    Users.UserRole:
      type: string
      enum:
        - Admin
        - Member
    Error.ValidationError:
      type: object
      required:
        - field
        - message
        - code
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
      description: バリデーションエラー詳細
    TypeSpec.Http.BadRequestResponse:
      type: object
      description: The server could not understand the request due to invalid syntax.
    TypeSpec.Http.UnauthorizedResponse:
      type: object
      description: Access is unauthorized.
    TypeSpec.Http.ForbiddenResponse:
      type: object
      description: Access is forbidden.
    TypeSpec.Http.NotFoundResponse:
      type: object
      description: The server cannot find the requested resource.
  securitySchemes:
    UserSessionAuth:
      type: http
      scheme: bearer
      description: ユーザーがログインすると発行されるsession_idをBearerトークンとして指定します

````