> ## 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 room composition.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/video.yml get /room_compositions/{room_composition_id}
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/{room_composition_id}:
    get:
      tags:
        - Room Compositions
      summary: View a room composition.
      operationId: ViewRoomComposition
      parameters:
        - name: room_composition_id
          in: path
          description: The unique identifier of a room composition.
          required: true
          schema:
            type: string
            format: uuid
            example: 5219b3af-87c6-4c08-9b58-5a533d893e21
      responses:
        '200':
          $ref: '#/components/responses/GetRoomCompositionResponse'
        '404':
          $ref: '#/components/responses/video_ResourceNotFound'
      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
            });

            const roomComposition = await client.roomCompositions.retrieve(
              '5219b3af-87c6-4c08-9b58-5a533d893e21',
            );

            console.log(roomComposition.data);
        - 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
            )
            room_composition = client.room_compositions.retrieve(
                "5219b3af-87c6-4c08-9b58-5a533d893e21",
            )
            print(room_composition.data)
        - 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\troomComposition, err := client.RoomCompositions.Get(context.TODO(), \"5219b3af-87c6-4c08-9b58-5a533d893e21\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", roomComposition.Data)\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.RoomCompositionRetrieveParams;

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


            public final class Main {
                private Main() {}

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

                    RoomCompositionRetrieveResponse roomComposition = client.roomCompositions().retrieve("5219b3af-87c6-4c08-9b58-5a533d893e21");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            room_composition =
            telnyx.room_compositions.retrieve("5219b3af-87c6-4c08-9b58-5a533d893e21")


            puts(room_composition)
        - 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 {
              $roomComposition = $client->roomCompositions->retrieve(
                '5219b3af-87c6-4c08-9b58-5a533d893e21'
              );

              var_dump($roomComposition);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx room-compositions retrieve \
              --api-key 'My API Key' \
              --room-composition-id 5219b3af-87c6-4c08-9b58-5a533d893e21
components:
  responses:
    GetRoomCompositionResponse:
      description: Get room composition response.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/RoomComposition'
    video_ResourceNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/video_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
    video_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
    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

````