# 获取房间角色列表

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /chatroom/v2/room_role/roles:
    get:
      summary: 获取房间角色列表
      deprecated: false
      description: ''
      tags:
        - HTTP接口/房间角色接口
      parameters:
        - name: room_id
          in: query
          description: 房间ID
          required: true
          example: ''
          schema:
            type: string
        - name: client_type
          in: query
          description: 声明请求黑盒语音
          required: true
          example: heybox_chat
          schema:
            type: string
            default: heybox_chat
        - name: x_client_type
          in: query
          description: 声明客户端类型
          required: true
          example: web
          schema:
            type: string
            default: web
        - name: os_type
          in: query
          description: 声明客户端类型
          required: true
          example: web
          schema:
            type: string
            default: web
        - name: x_os_type
          in: query
          description: 声明客户端是bot
          required: true
          example: bot
          schema:
            type: string
            default: bot
        - name: x_app
          in: query
          description: 声明请求黑盒语音
          required: true
          example: heybox_chat
          schema:
            type: string
            default: heybox_chat
        - name: chat_os_type
          in: query
          description: 声明客户端是bot
          required: true
          example: bot
          schema:
            type: string
            default: bot
        - name: chat_version
          in: query
          description: 客户端版本号,不同版本返回的结果可能有区别
          required: true
          example: 1.30.0
          schema:
            type: string
            default: 1.30.0
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json;charset=UTF-8
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                  result:
                    type: object
                    properties:
                      roles:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/%E8%A7%92%E8%89%B2%E8%AF%A6%E6%83%85
                    required:
                      - roles
                    x-apifox-orders:
                      - roles
                    x-apifox-ignore-properties: []
                  status:
                    type: string
                required:
                  - msg
                  - result
                  - status
                x-apifox-orders:
                  - msg
                  - result
                  - status
                x-apifox-ignore-properties: []
              example:
                msg: ''
                result:
                  roles:
                    - name: 高级管理员
                      icon: ''
                      color_list: null
                      id: '3642878923738988546'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '1'
                      type: 7
                      color: 3198065
                      position: 0
                      del_tag: 1
                      hoist: 1
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: 成员管理员
                      icon: ''
                      color_list: null
                      id: '3642878923738988556'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '13824'
                      type: 3
                      color: 3447000
                      position: 32762
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: 文字频道管理员
                      icon: ''
                      color_list: null
                      id: '3642878923738988554'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '344064'
                      type: 4
                      color: 9792727
                      position: 32763
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: 语音频道管理员
                      icon: ''
                      color_list: null
                      id: '3642878923738988552'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '213909504'
                      type: 5
                      color: 1883293
                      position: 32764
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: 社区共建者
                      icon: ''
                      color_list: null
                      id: '3642878923738988550'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '3221225472'
                      type: 6
                      color: 7310033
                      position: 32765
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: 游客
                      icon: ''
                      color_list: null
                      id: '3642878923738988548'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '2'
                      type: 254
                      color: 0
                      position: 32766
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                    - name: '123'
                      icon: ''
                      color_list: null
                      id: '3647669220917534720'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '16402'
                      type: 2
                      color: 12764101
                      position: 32766
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '8829761'
                      create_time: 1727083134
                    - name: 全体成员
                      icon: ''
                      color_list: null
                      id: '3642878923738988544'
                      department_id: '3642878923633221632'
                      room_id: '3642878923633221632'
                      permissions: '133176672578'
                      type: 255
                      color: 0
                      position: 32767
                      del_tag: 1
                      hoist: 0
                      mentionable: 0
                      creator: '0'
                      create_time: 0
                status: ok
          headers: {}
          x-apifox-name: 成功
      security:
        - apikey-header-token: []
      x-apifox-folder: HTTP接口/房间角色接口
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/4856361/apis/api-220721816-run
components:
  schemas:
    角色详情:
      type: object
      properties:
        name:
          type: string
          description: 角色名称。
        icon:
          type: string
          description: 角色icon的url
        color_list:
          type: array
          items:
            type: integer
          description: 渐变色的颜色数组
        id:
          type: string
          description: 角色的唯一标识 ID。
        department_id:
          type: string
          description: 所属部门的 ID。目前已经弃用
        room_id:
          type: string
          description: 房间 ID，与部门 ID 相同
        permissions:
          type: string
          description: 权限值
        type:
          type: integer
          description: 类型标识，用于区分不同类型的角色
        color:
          type: integer
          description: 颜色值，在界面展示中用于区分不同角色。
        position:
          type: integer
          description: 角色排序
        del_tag:
          type: integer
          description: 删除标记 1是没有被删除 ,0是已经被删除
        hoist:
          type: integer
          description: 是否将该角色成员在右侧和普通成员区分显示,1是区分0是不区分
        mentionable:
          type: integer
          description: 可提及标记，可能表示该角色在某些场景下是否可被@
        creator:
          type: string
          description: 创建者标识，0 的话则为房间创建者
        create_time:
          type: integer
          description: 创建时间戳,旧数据为0
      required:
        - name
        - icon
        - color_list
        - id
        - department_id
        - room_id
        - permissions
        - type
        - color
        - position
        - del_tag
        - hoist
        - mentionable
        - creator
        - create_time
      x-apifox-orders:
        - name
        - icon
        - color_list
        - id
        - department_id
        - room_id
        - permissions
        - type
        - color
        - position
        - del_tag
        - hoist
        - mentionable
        - creator
        - create_time
      description: '  角色详情'
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    token:
      type: apikey
      in: header
      name: token
      token: ODYzNzY0NDM7MTc1NTc1OTk1NzYyODYzNjQ0NzsxNTU0MDM2NTkxNzk2OTM1OTY5
    apikey-header-token:
      type: apiKey
      in: header
      name: token
servers:
  - url: http://prod-cn.your-api-server.com
    description: 正式环境
security:
  - apikey-header-token: []

```
