> ## 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 /channels/{channel_id}
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:
  /channels/{channel_id}:
    get:
      tags:
        - Client Channels
      summary: チャンネル詳細の取得
      description: 指定したチャンネルの詳細情報を取得します。
      operationId: ClientChannels_getChannel
      parameters:
        - name: channel_id
          in: path
          required: true
          description: 取得対象となるチャンネルのID
          schema:
            $ref: '#/components/schemas/ChannelId'
      responses:
        '200':
          description: チャンネル詳細を返却
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Channels.ClientChannelDetailWithLatestMessage
        '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:
    ChannelId:
      type: string
      minLength: 1
      maxLength: 100
      pattern: ^[a-zA-Z0-9_-]+$
    Channels.ClientChannelDetailWithLatestMessage:
      type: object
      required:
        - name
        - channel_type
        - is_archived
        - created_at
        - updated_at
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/ChannelId'
          description: チャンネルID
          readOnly: true
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: チャンネル名
        channel_type:
          allOf:
            - $ref: '#/components/schemas/Channels.ChannelType'
          description: 公開チャンネルか秘密チャンネルか
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: 任意の追加メタデータ
        is_archived:
          type: boolean
          description: アーカイブ済みかどうか
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: 作成日時
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: 更新日時
          readOnly: true
        latest_message:
          allOf:
            - $ref: '#/components/schemas/Messages.Message'
          description: チャンネル内の最新メッセージ
        unread_count:
          type: integer
          format: int32
          description: チャンネル内の未読メッセージ数
      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: サーバーでエラーが発生しました。時間をおいて再度お試しください。
    Channels.ChannelType:
      type: string
      enum:
        - Public
        - Secret
    Messages.Message:
      type: object
      required:
        - id
        - channel_id
        - sent_by
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: メッセージID
          readOnly: true
        content:
          type: string
          maxLength: 32000
          description: メッセージ本文
        channel_id:
          allOf:
            - $ref: '#/components/schemas/ChannelId'
          description: メッセージが属するチャンネルのID
          readOnly: true
        thread_id:
          type: string
          nullable: true
          format: uuid
          description: スレッドメッセージとして返信する場合の親メッセージID
        sent_by:
          allOf:
            - $ref: '#/components/schemas/Users.UserBasic'
          description: メッセージを送信したユーザー
          readOnly: true
        read_by:
          type: array
          items:
            $ref: '#/components/schemas/Users.UserBasic'
          description: 既読したユーザーの一覧
          readOnly: true
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/Messages.Reaction'
          description: メッセージに付与されたリアクション一覧
          readOnly: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Messages.Attachment'
          description: 添付ファイル一覧
          readOnly: true
        mentions:
          type: array
          items:
            $ref: '#/components/schemas/Messages.Mention'
          description: メンション一覧
          readOnly: true
        thread_reply_info:
          type: object
          allOf:
            - $ref: '#/components/schemas/Messages.ThreadReplyInfo'
          nullable: true
          description: このメッセージへの返信に関する情報
          readOnly: true
        edited_at:
          type: string
          format: date-time
          nullable: true
          description: 編集日時
          readOnly: true
        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.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.
    Users.UserBasic:
      type: object
      required:
        - id
        - display_name
        - role
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/UserId'
          description: ユーザーの一意な識別子
        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:一般ユーザー)
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: 任意の追加メタデータ
      description: 簡易ユーザー情報（IDと基本情報のみ）
    Messages.Reaction:
      type: object
      required:
        - id
        - message_id
        - emoji_code
        - user
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: リアクションID
          readOnly: true
        message_id:
          type: string
          format: uuid
          description: リアクションを付与するメッセージID
          readOnly: true
        emoji_code:
          type: string
          description: リアクションに用いる絵文字のコード
        user:
          allOf:
            - $ref: '#/components/schemas/Users.UserBasic'
          description: リアクションを付与したユーザー
          readOnly: true
        created_at:
          type: string
          format: date-time
          nullable: true
          description: リアクションが付与された日時
          readOnly: true
    Messages.Attachment:
      type: object
      required:
        - url
        - name
        - mime_type
        - size
        - source
        - channel_id
      properties:
        id:
          type: string
          format: uuid
          description: 添付ファイルID
          readOnly: true
        message_id:
          type: string
          format: uuid
          description: 添付対象のメッセージID
          readOnly: true
        url:
          type: string
          description: ファイルのURL（バイナリアップロードの場合は認証付きURL）
          readOnly: true
        name:
          type: string
          description: ファイル名
        mime_type:
          type: string
          description: MIMEタイプ
        size:
          type: integer
          format: int64
          description: ファイルサイズ（バイト）
        source:
          allOf:
            - $ref: '#/components/schemas/Messages.FileSource'
          description: ファイルのソース
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: 任意の追加メタデータ
        channel_id:
          allOf:
            - $ref: '#/components/schemas/ChannelId'
          description: 添付を行うチャンネルID
          readOnly: true
    Messages.Mention:
      type: object
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/Messages.MentionType'
          description: メンションタイプ
        user:
          allOf:
            - $ref: '#/components/schemas/Users.UserBasic'
          description: メンション対象のユーザー情報（userタイプの場合のみ）
      description: メンション情報（取得時）
    Messages.ThreadReplyInfo:
      type: object
      required:
        - count
        - last_replied_at
      properties:
        count:
          type: integer
          description: 返信数
          readOnly: true
        last_replied_at:
          type: string
          format: date-time
          description: 最終返信日時
          readOnly: true
      description: スレッド返信情報
    UserId:
      type: string
      minLength: 1
      maxLength: 100
      pattern: ^[a-zA-Z0-9_-]+$
    Users.UserRole:
      type: string
      enum:
        - Admin
        - Member
    Messages.FileSource:
      type: string
      enum:
        - Binary
        - Url
      description: ファイルのソース種別
    Messages.MentionType:
      type: string
      enum:
        - User
        - Channel
      description: メンションタイプ
  securitySchemes:
    UserSessionAuth:
      type: http
      scheme: bearer
      description: ユーザーがログインすると発行されるsession_idをBearerトークンとして指定します

````