import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const roomComposition = await client.roomCompositions.retrieve('5219b3af-87c6-4c08-9b58-5a533d893e21');
console.log(roomComposition.data);{
"data": {
"completed_at": "2022-02-25T05:39:56.377426Z",
"download_url": null,
"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": [
"*"
],
"width": 1280,
"x_pos": 0,
"y_pos": 0,
"z_pos": 0
}
},
"webhook_event_url": "https://webhook.site/544663ce-b692-4f9c-80ed-e5ad97cd5c02"
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const roomComposition = await client.roomCompositions.retrieve('5219b3af-87c6-4c08-9b58-5a533d893e21');
console.log(roomComposition.data);{
"data": {
"completed_at": "2022-02-25T05:39:56.377426Z",
"download_url": null,
"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": [
"*"
],
"width": 1280,
"x_pos": 0,
"y_pos": 0,
"z_pos": 0
}
},
"webhook_event_url": "https://webhook.site/544663ce-b692-4f9c-80ed-e5ad97cd5c02"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of a room composition.
"5219b3af-87c6-4c08-9b58-5a533d893e21"
Get room composition response.
Show child attributes
A unique identifier for the room composition.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Identify the room associated with the room composition.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777b0"
Identify the room session associated with the room composition.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777b0"
Identify the user associated with the room composition.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777b0"
Shows the room composition status.
completed, enqueued, processing "completed"
Shows the room composition size in MB.
10.5
Url to download the composition.
"https://www.example.com"
Shows the room composition duration in seconds.
67
Shows format of the room composition.
mp4 "mp4"
ISO 8601 timestamp when the room composition was created.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room composition was updated.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room composition has ended.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room composition has stated.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room composition has completed.
"2021-03-26T17:51:59.588408Z"
Describes the video layout of the room composition in terms of regions. Limited to 2 regions.
Show child attributes
Show child attributes
X axis value (in pixels) of the region's upper left corner relative to the upper left corner of the whole room composition viewport.
100
Y axis value (in pixels) of the region's upper left corner relative to the upper left corner of the whole room composition viewport.
100
Regions with higher z_pos values are stacked on top of regions with lower z_pos values
-99 <= x <= 991
Height of the video region
x >= 16360
Width of the video region
x >= 16480
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.
1 <= x <= 10003
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.
1 <= x <= 10003
Array of video recording ids to be composed in the region. Can be "*" to specify all video recordings in the session
The URL where webhooks related to this room composition will be sent. Must include a scheme, such as 'https'.
"https://example.com"
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'.
"https://failover.example.com"
Specifies how many seconds to wait before timing out a webhook.
0 <= x <= 3025
"room_composition"
{
"completed_at": "2022-02-25T05:39:56.377426Z",
"download_url": null,
"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": ["*"],
"width": 1280,
"x_pos": 0,
"y_pos": 0,
"z_pos": 0
}
},
"webhook_event_url": "https://webhook.site/544663ce-b692-4f9c-80ed-e5ad97cd5c02"
}Was this page helpful?