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

# View a list of room compositions.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/video.yml get /room_compositions
openapi: 3.1.0
info:
  title: Telnyx Video API
  version: 2.0.0
  description: API for Video.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /room_compositions:
    get:
      tags:
        - Room Compositions
      summary: View a list of room compositions.
      operationId: ListRoomCompositions
      parameters:
        - name: filter
          in: query
          style: deepObject
          explode: true
          required: false
          description: >-
            Consolidated filter parameter (deepObject style). Originally:
            filter[date_created_at][eq], filter[date_created_at][gte],
            filter[date_created_at][lte], filter[session_id], filter[status]
          schema:
            type: object
            properties:
              date_created_at:
                type: object
                properties:
                  eq:
                    type: string
                    format: date
                    example: '2021-04-25'
                    description: >-
                      ISO 8601 date for filtering room compositions created on
                      that date.
                  gte:
                    type: string
                    format: date
                    example: '2021-04-25'
                    description: >-
                      ISO 8601 date for filtering room compositions created on
                      or after that date.
                  lte:
                    type: string
                    format: date
                    example: '2021-04-25'
                    description: >-
                      ISO 8601 date for filtering room compositions created on
                      or before that date.
              session_id:
                type: string
                format: uuid
                example: 92e7d459-bcc5-4386-9f5f-6dd14a82588d
                description: The session_id for filtering room compositions.
              status:
                type: string
                example: completed
                enum:
                  - completed
                  - processing
                  - enqueued
                description: The status for filtering room compositions.
        - $ref: '#/components/parameters/video_PageConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/ListRoomCompositionsResponse'
        4XX:
          $ref: '#/components/responses/video_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            // Automatically fetches more pages as needed.

            for await (const roomComposition of client.roomCompositions.list())
            {
              console.log(roomComposition.id);
            }
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            page = client.room_compositions.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.RoomCompositions.List(context.TODO(), telnyx.RoomCompositionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.roomcompositions.RoomCompositionListPage;

            import
            com.telnyx.sdk.models.roomcompositions.RoomCompositionListParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    RoomCompositionListPage page = client.roomCompositions().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.room_compositions.list

            puts(page)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $page = $client->roomCompositions->list(
                filter: [
                  'dateCreatedAt' => [
                    'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
                  ],
                  'sessionID' => '92e7d459-bcc5-4386-9f5f-6dd14a82588d',
                  'status' => 'completed',
                ],
                pageNumber: 0,
                pageSize: 0,
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx room-compositions list \
              --api-key 'My API Key'
components:
  parameters:
    video_PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: >-
        Consolidated page parameter (deepObject style). Originally: page[size],
        page[number]
      schema:
        type: object
        properties:
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page.
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load.
  responses:
    ListRoomCompositionsResponse:
      description: List room compositions response.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/RoomComposition'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
    video_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: Error
  schemas:
    RoomComposition:
      type: object
      properties:
        id:
          description: A unique identifier for the room composition.
          type: string
          format: uuid
          example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0
        room_id:
          description: Identify the room associated with the room composition.
          type: string
          format: uuid
          example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0
        session_id:
          description: Identify the room session associated with the room composition.
          type: string
          format: uuid
          example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0
        user_id:
          description: Identify the user associated with the room composition.
          type: string
          format: uuid
          example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0
        status:
          description: Shows the room composition status.
          type: string
          example: completed
          enum:
            - completed
            - enqueued
            - processing
        size_mb:
          description: Shows the room composition size in MB.
          type: number
          format: float
          example: 10.5
        download_url:
          description: Url to download the composition.
          type: string
          example: https://www.example.com
        duration_secs:
          description: Shows the room composition duration in seconds.
          type: integer
          example: 67
        format:
          description: Shows format of the room composition.
          type: string
          example: mp4
          enum:
            - mp4
        created_at:
          description: ISO 8601 timestamp when the room composition was created.
          type: string
          format: date-time
          example: '2021-03-26T17:51:59.588408Z'
        updated_at:
          description: ISO 8601 timestamp when the room composition was updated.
          type: string
          format: date-time
          example: '2021-03-26T17:51:59.588408Z'
        ended_at:
          description: ISO 8601 timestamp when the room composition has ended.
          type: string
          format: date-time
          example: '2021-03-26T17:51:59.588408Z'
        started_at:
          description: ISO 8601 timestamp when the room composition has stated.
          type: string
          format: date-time
          example: '2021-03-26T17:51:59.588408Z'
        completed_at:
          description: ISO 8601 timestamp when the room composition has completed.
          type: string
          format: date-time
          example: '2021-03-26T17:51:59.588408Z'
        video_layout:
          description: >-
            Describes the video layout of the room composition in terms of
            regions. Limited to 2 regions.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/VideoRegion'
        webhook_event_url:
          description: >-
            The URL where webhooks related to this room composition will be
            sent. Must include a scheme, such as 'https'.
          type: string
          format: uri
          example: https://example.com
        webhook_event_failover_url:
          type: string
          format: uri
          description: >-
            The failover URL where webhooks related to this room composition
            will be sent if sending to the primary URL fails. Must include a
            scheme, such as 'https'.
          example: https://failover.example.com
          default: ''
        webhook_timeout_secs:
          type: integer
          minimum: 0
          maximum: 30
          description: Specifies how many seconds to wait before timing out a webhook.
          example: 25
          default: null
        resolution:
          type: string
          description: The resolution of the room composition.
          example: 1280x720
        record_type:
          type: string
          example: room_composition
          readOnly: true
      example:
        completed_at: '2022-02-25T05:39:56.377426Z'
        download_url: https://example.com
        duration_secs: 84
        ended_at: '2022-02-24T23:22:24.577677Z'
        format: mp4
        id: 7103dc53-ee59-4b54-a58b-c77d99ceb037
        record_type: composition
        resolution: 1280x720
        room_id: f981dbb3-228a-44e9-ac54-e87f0e2658b0
        session_id: 8f728d7b-00e2-4c59-8c27-f564b828df87
        size_mb: 6
        started_at: '2022-02-24T23:21:00.077209Z'
        status: enqueued
        user_id: 12a04ec9-0f91-4a91-9f3a-a19d9931182e
        video_layout:
          first:
            height: 720
            video_sources:
              - 7b61621f-62e0-4aad-ab11-9fd19e272e73
            width: 1280
            x_pos: 0
            y_pos: 0
            z_pos: 0
        webhook_event_url: https://webhook.site/544663ce-b692-4f9c-80ed-e5ad97cd5c02
    PaginationMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
    VideoRegion:
      type: object
      properties:
        x_pos:
          description: >-
            X axis value (in pixels) of the region's upper left corner relative
            to the upper left corner of the whole room composition viewport.
          type: integer
          example: 100
          default: 0
        y_pos:
          description: >-
            Y axis value (in pixels) of the region's upper left corner relative
            to the upper left corner of the whole room composition viewport.
          type: integer
          example: 100
          default: 0
        z_pos:
          description: >-
            Regions with higher z_pos values are stacked on top of regions with
            lower z_pos values
          type: integer
          minimum: -99
          maximum: 99
          example: 1
          default: 0
        height:
          description: Height of the video region
          type: integer
          minimum: 16
          example: 360
        width:
          description: Width of the video region
          type: integer
          minimum: 16
          example: 480
        max_columns:
          description: >-
            Maximum number of columns of the region's placement grid. By
            default, the region has as many columns as needed to layout all the
            specified video sources.
          type: integer
          minimum: 1
          maximum: 1000
          example: 3
        max_rows:
          description: >-
            Maximum number of rows of the region's placement grid. By default,
            the region has as many rows as needed to layout all the specified
            video sources.
          type: integer
          minimum: 1
          maximum: 1000
          example: 3
        video_sources:
          description: >-
            Array of video recording ids to be composed in the region. Can be
            "*" to specify all video recordings in the session
          type: array
          items:
            type: string
            format: uuid
            example: 7b61621f-62e0-4aad-ab11-9fd19e272e73
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````