github.com/twilio/twilio-go@v1.20.1/rest/video/v1/docs/CompositionsApi.md (about) 1 # CompositionsApi 2 3 All URIs are relative to *https://video.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateComposition**](CompositionsApi.md#CreateComposition) | **Post** /v1/Compositions | 8 [**DeleteComposition**](CompositionsApi.md#DeleteComposition) | **Delete** /v1/Compositions/{Sid} | 9 [**FetchComposition**](CompositionsApi.md#FetchComposition) | **Get** /v1/Compositions/{Sid} | 10 [**ListComposition**](CompositionsApi.md#ListComposition) | **Get** /v1/Compositions | 11 12 13 14 ## CreateComposition 15 16 > VideoV1Composition CreateComposition(ctx, optional) 17 18 19 20 21 22 ### Path Parameters 23 24 This endpoint does not need any path parameter. 25 26 ### Other Parameters 27 28 Other parameters are passed through a pointer to a CreateCompositionParams struct 29 30 31 Name | Type | Description 32 ------------- | ------------- | ------------- 33 **RoomSid** | **string** | The SID of the Group Room with the media tracks to be used as composition sources. 34 **VideoLayout** | [**interface{}**](interface{}.md) | An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request 35 **AudioSources** | **[]string** | An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request 36 **AudioSourcesExcluded** | **[]string** | An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. 37 **Resolution** | **string** | A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. 38 **Format** | **string** | 39 **StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. 40 **StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. 41 **Trim** | **bool** | Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. 42 43 ### Return type 44 45 [**VideoV1Composition**](VideoV1Composition.md) 46 47 ### Authorization 48 49 [accountSid_authToken](../README.md#accountSid_authToken) 50 51 ### HTTP request headers 52 53 - **Content-Type**: application/x-www-form-urlencoded 54 - **Accept**: application/json 55 56 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 57 [[Back to Model list]](../README.md#documentation-for-models) 58 [[Back to README]](../README.md) 59 60 61 ## DeleteComposition 62 63 > DeleteComposition(ctx, Sid) 64 65 66 67 Delete a Recording Composition resource identified by a Composition SID. 68 69 ### Path Parameters 70 71 72 Name | Type | Description 73 ------------- | ------------- | ------------- 74 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 75 **Sid** | **string** | The SID of the Composition resource to delete. 76 77 ### Other Parameters 78 79 Other parameters are passed through a pointer to a DeleteCompositionParams struct 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 85 ### Return type 86 87 (empty response body) 88 89 ### Authorization 90 91 [accountSid_authToken](../README.md#accountSid_authToken) 92 93 ### HTTP request headers 94 95 - **Content-Type**: Not defined 96 - **Accept**: Not defined 97 98 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 99 [[Back to Model list]](../README.md#documentation-for-models) 100 [[Back to README]](../README.md) 101 102 103 ## FetchComposition 104 105 > VideoV1Composition FetchComposition(ctx, Sid) 106 107 108 109 Returns a single Composition resource identified by a Composition SID. 110 111 ### Path Parameters 112 113 114 Name | Type | Description 115 ------------- | ------------- | ------------- 116 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 117 **Sid** | **string** | The SID of the Composition resource to fetch. 118 119 ### Other Parameters 120 121 Other parameters are passed through a pointer to a FetchCompositionParams struct 122 123 124 Name | Type | Description 125 ------------- | ------------- | ------------- 126 127 ### Return type 128 129 [**VideoV1Composition**](VideoV1Composition.md) 130 131 ### Authorization 132 133 [accountSid_authToken](../README.md#accountSid_authToken) 134 135 ### HTTP request headers 136 137 - **Content-Type**: Not defined 138 - **Accept**: application/json 139 140 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 141 [[Back to Model list]](../README.md#documentation-for-models) 142 [[Back to README]](../README.md) 143 144 145 ## ListComposition 146 147 > []VideoV1Composition ListComposition(ctx, optional) 148 149 150 151 List of all Recording compositions. 152 153 ### Path Parameters 154 155 This endpoint does not need any path parameter. 156 157 ### Other Parameters 158 159 Other parameters are passed through a pointer to a ListCompositionParams struct 160 161 162 Name | Type | Description 163 ------------- | ------------- | ------------- 164 **Status** | **string** | Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`. 165 **DateCreatedAfter** | **time.Time** | Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. 166 **DateCreatedBefore** | **time.Time** | Read only Composition resources created before this ISO 8601 date-time with time zone. 167 **RoomSid** | **string** | Read only Composition resources with this Room SID. 168 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 169 **Limit** | **int** | Max number of records to return. 170 171 ### Return type 172 173 [**[]VideoV1Composition**](VideoV1Composition.md) 174 175 ### Authorization 176 177 [accountSid_authToken](../README.md#accountSid_authToken) 178 179 ### HTTP request headers 180 181 - **Content-Type**: Not defined 182 - **Accept**: application/json 183 184 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 185 [[Back to Model list]](../README.md#documentation-for-models) 186 [[Back to README]](../README.md) 187