> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# list_events

> List events that occurred during a room session.

List events that occurred during a room session (e.g., participant joins,
leaves, audio/video mute changes).

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /api/video/room_sessions/{id}/events:
    get:
      operationId: list_room_session_events
      summary: List room session events
      description: >-
        A list of Events for a particular Room Session.


        #### Permissions


        The API token used to authenticate must have the following scope(s)
        enabled to make a successful request: _Video_.


        [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
      tags:
        - subpackage_roomSessions
      parameters:
        - name: id
          in: path
          description: Unique ID of the Room Session.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: page_number
          in: query
          description: >-
            Page number to return. Requires `page_token` for values greater than
            0.
          required: false
          schema:
            type: integer
            default: 0
        - name: page_size
          in: query
          description: >-
            Specify the number of results to return on a single page. The
            default page size is `50` and the maximum is `1000`.
          required: false
          schema:
            type: integer
            default: 50
        - name: page_token
          in: query
          description: >-
            Token for cursor-based pagination. Required when `page_number` is
            greater than 0.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video.ListRoomSessionEventsResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video.VideoStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
servers:
  - url: https://%7BYour_Space_Name%7D.signalwire.com
    description: SignalWire API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    Video.PaginationLinks:
      type: object
      properties:
        self:
          type: string
          description: Link to the current page.
        first:
          type: string
          description: Link to the first page.
        next:
          type: string
          description: Link to the next page.
        prev:
          type: string
          description: Link to the previous page.
      required:
        - self
        - first
      description: Pagination links for list responses.
      title: Video.PaginationLinks
    VideoRoomSessionEventPayload:
      type: object
      properties: {}
      description: Event-specific payload data.
      title: VideoRoomSessionEventPayload
    Video.RoomSessionEvent:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the event.
        project_id:
          $ref: '#/components/schemas/uuid'
          description: The ID of the project.
        room_id:
          $ref: '#/components/schemas/uuid'
          description: The ID of the room.
        room_session_id:
          $ref: '#/components/schemas/uuid'
          description: The ID of the room session.
        room_recording_id:
          $ref: '#/components/schemas/uuid'
          description: >-
            The ID of the associated room recording. Only present for
            recording-related events.
        room_participant_id:
          $ref: '#/components/schemas/uuid'
          description: >-
            The ID of the associated room participant. Only present for
            participant-related events.
        level:
          type: string
          description: The severity level of the event.
        name:
          type: string
          description: The name of the event.
        payload:
          $ref: '#/components/schemas/VideoRoomSessionEventPayload'
          description: Event-specific payload data.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the event was created.
      required:
        - id
        - project_id
        - room_id
        - room_session_id
        - level
        - name
        - payload
        - created_at
      description: Room session event response object.
      title: Video.RoomSessionEvent
    Video.ListRoomSessionEventsResponse:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Video.PaginationLinks'
          description: Pagination links.
        data:
          type: array
          items:
            $ref: '#/components/schemas/Video.RoomSessionEvent'
          description: List of room session events.
      required:
        - links
        - data
      description: List room session events response.
      title: Video.ListRoomSessionEventsResponse
    TypesStatusCodesStatusCode400Error:
      type: string
      enum:
        - Bad Request
      title: TypesStatusCodesStatusCode400Error
    Types.StatusCodes.StatusCode400:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode400Error'
      required:
        - error
      description: The request is invalid.
      title: Types.StatusCodes.StatusCode400
    TypesStatusCodesStatusCode401Error:
      type: string
      enum:
        - Unauthorized
      title: TypesStatusCodesStatusCode401Error
    Types.StatusCodes.StatusCode401:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error'
      required:
        - error
      description: Access is unauthorized.
      title: Types.StatusCodes.StatusCode401
    Types.StatusCodes.RestApiErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The category of error.
        code:
          type: string
          description: A specific error code.
        message:
          type: string
          description: A description of what caused the error.
        attribute:
          type:
            - string
            - 'null'
          description: The request parameter that caused the error, if applicable.
        url:
          type: string
          description: A link to documentation about this error.
      required:
        - type
        - code
        - message
        - url
      description: Details about a specific error.
      title: Types.StatusCodes.RestApiErrorItem
    Video.VideoStatusCode422:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      required:
        - errors
      description: The request contains invalid parameters. See errors for details.
      title: Video.VideoStatusCode422
    TypesStatusCodesStatusCode500Error:
      type: string
      enum:
        - Internal Server Error
      title: TypesStatusCodesStatusCode500Error
    Types.StatusCodes.StatusCode500:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error'
      required:
        - error
      description: An internal server error occurred.
      title: Types.StatusCodes.StatusCode500

```

## **Response Example**

### Response (200)

```json
{
  "links": {
    "self": "https://example.signalwire.com/api/video/rooms?page=2",
    "first": "https://example.signalwire.com/api/video/rooms?page=1",
    "next": "https://example.signalwire.com/api/video/rooms?page=3",
    "prev": "https://example.signalwire.com/api/video/rooms?page=1"
  },
  "data": [
    {
      "id": "e44f56a8-7c69-6153-b45c-ab3456789012",
      "project_id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
      "room_id": "b2c3d4e5-6f70-8901-bcde-f12345678901",
      "room_session_id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
      "level": "info",
      "name": "room.started",
      "payload": {},
      "created_at": "2022-01-01T10:00:00Z",
      "room_recording_id": "d33e35f7-6b58-5042-a34b-ef2345678901",
      "room_participant_id": "e44f68a9-7c69-6153-b56d-ef3456789012"
    }
  ]
}
```

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

events = client.video.room_sessions.list_events("session-id")
```