github.com/muxinc/mux-go@v1.1.1/docs/LiveStreamsApi.md (about) 1 # \LiveStreamsApi 2 3 All URIs are relative to *https://api.mux.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateLiveStream**](LiveStreamsApi.md#CreateLiveStream) | **Post** /video/v1/live-streams | Create a live stream 8 [**CreateLiveStreamPlaybackId**](LiveStreamsApi.md#CreateLiveStreamPlaybackId) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids | Create a live stream playback ID 9 [**CreateLiveStreamSimulcastTarget**](LiveStreamsApi.md#CreateLiveStreamSimulcastTarget) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target 10 [**DeleteLiveStream**](LiveStreamsApi.md#DeleteLiveStream) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream 11 [**DeleteLiveStreamPlaybackId**](LiveStreamsApi.md#DeleteLiveStreamPlaybackId) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID 12 [**DeleteLiveStreamSimulcastTarget**](LiveStreamsApi.md#DeleteLiveStreamSimulcastTarget) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target 13 [**DisableLiveStream**](LiveStreamsApi.md#DisableLiveStream) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream 14 [**EnableLiveStream**](LiveStreamsApi.md#EnableLiveStream) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream 15 [**GetLiveStream**](LiveStreamsApi.md#GetLiveStream) | **Get** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream 16 [**GetLiveStreamPlaybackId**](LiveStreamsApi.md#GetLiveStreamPlaybackId) | **Get** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID 17 [**GetLiveStreamSimulcastTarget**](LiveStreamsApi.md#GetLiveStreamSimulcastTarget) | **Get** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target 18 [**ListLiveStreams**](LiveStreamsApi.md#ListLiveStreams) | **Get** /video/v1/live-streams | List live streams 19 [**ResetStreamKey**](LiveStreamsApi.md#ResetStreamKey) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream’s stream key 20 [**SignalLiveStreamComplete**](LiveStreamsApi.md#SignalLiveStreamComplete) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished 21 [**UpdateLiveStreamEmbeddedSubtitles**](LiveStreamsApi.md#UpdateLiveStreamEmbeddedSubtitles) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles 22 23 24 # **CreateLiveStream** 25 > LiveStreamResponse CreateLiveStream(ctx, createLiveStreamRequest) 26 Create a live stream 27 28 ### Required Parameters 29 30 Name | Type | Description | Notes 31 ------------- | ------------- | ------------- | ------------- 32 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 33 **createLiveStreamRequest** | [**CreateLiveStreamRequest**](CreateLiveStreamRequest.md)| | 34 35 ### Return type 36 37 [**LiveStreamResponse**](LiveStreamResponse.md) 38 39 ### Authorization 40 41 [accessToken](../README.md#accessToken) 42 43 ### HTTP request headers 44 45 - **Content-Type**: application/json 46 - **Accept**: application/json 47 48 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 49 50 # **CreateLiveStreamPlaybackId** 51 > CreatePlaybackIdResponse CreateLiveStreamPlaybackId(ctx, lIVESTREAMID, createPlaybackIdRequest) 52 Create a live stream playback ID 53 54 ### Required Parameters 55 56 Name | Type | Description | Notes 57 ------------- | ------------- | ------------- | ------------- 58 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 59 **lIVESTREAMID** | **string**| The live stream ID | 60 **createPlaybackIdRequest** | [**CreatePlaybackIdRequest**](CreatePlaybackIdRequest.md)| | 61 62 ### Return type 63 64 [**CreatePlaybackIdResponse**](CreatePlaybackIDResponse.md) 65 66 ### Authorization 67 68 [accessToken](../README.md#accessToken) 69 70 ### HTTP request headers 71 72 - **Content-Type**: application/json 73 - **Accept**: application/json 74 75 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 76 77 # **CreateLiveStreamSimulcastTarget** 78 > SimulcastTargetResponse CreateLiveStreamSimulcastTarget(ctx, lIVESTREAMID, createSimulcastTargetRequest) 79 Create a live stream simulcast target 80 81 Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API. 82 83 ### Required Parameters 84 85 Name | Type | Description | Notes 86 ------------- | ------------- | ------------- | ------------- 87 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 88 **lIVESTREAMID** | **string**| The live stream ID | 89 **createSimulcastTargetRequest** | [**CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md)| | 90 91 ### Return type 92 93 [**SimulcastTargetResponse**](SimulcastTargetResponse.md) 94 95 ### Authorization 96 97 [accessToken](../README.md#accessToken) 98 99 ### HTTP request headers 100 101 - **Content-Type**: application/json 102 - **Accept**: application/json 103 104 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 105 106 # **DeleteLiveStream** 107 > DeleteLiveStream(ctx, lIVESTREAMID) 108 Delete a live stream 109 110 ### Required Parameters 111 112 Name | Type | Description | Notes 113 ------------- | ------------- | ------------- | ------------- 114 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 115 **lIVESTREAMID** | **string**| The live stream ID | 116 117 ### Return type 118 119 (empty response body) 120 121 ### Authorization 122 123 [accessToken](../README.md#accessToken) 124 125 ### HTTP request headers 126 127 - **Content-Type**: Not defined 128 - **Accept**: Not defined 129 130 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 131 132 # **DeleteLiveStreamPlaybackId** 133 > DeleteLiveStreamPlaybackId(ctx, lIVESTREAMID, pLAYBACKID) 134 Delete a live stream playback ID 135 136 ### Required Parameters 137 138 Name | Type | Description | Notes 139 ------------- | ------------- | ------------- | ------------- 140 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 141 **lIVESTREAMID** | **string**| The live stream ID | 142 **pLAYBACKID** | **string**| The live stream's playback ID. | 143 144 ### Return type 145 146 (empty response body) 147 148 ### Authorization 149 150 [accessToken](../README.md#accessToken) 151 152 ### HTTP request headers 153 154 - **Content-Type**: Not defined 155 - **Accept**: Not defined 156 157 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 158 159 # **DeleteLiveStreamSimulcastTarget** 160 > DeleteLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID) 161 Delete a Live Stream Simulcast Target 162 163 Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. 164 165 ### Required Parameters 166 167 Name | Type | Description | Notes 168 ------------- | ------------- | ------------- | ------------- 169 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 170 **lIVESTREAMID** | **string**| The live stream ID | 171 **sIMULCASTTARGETID** | **string**| The ID of the simulcast target. | 172 173 ### Return type 174 175 (empty response body) 176 177 ### Authorization 178 179 [accessToken](../README.md#accessToken) 180 181 ### HTTP request headers 182 183 - **Content-Type**: Not defined 184 - **Accept**: Not defined 185 186 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 187 188 # **DisableLiveStream** 189 > DisableLiveStreamResponse DisableLiveStream(ctx, lIVESTREAMID) 190 Disable a live stream 191 192 Disables a live stream, making it reject incoming RTMP streams until re-enabled. The API also ends the live stream recording immediately when active. Ending the live stream recording adds the `EXT-X-ENDLIST` tag to the HLS manifest which notifies the player that this live stream is over. Mux also closes the encoder connection immediately. Any attempt from the encoder to re-establish connection will fail till the live stream is re-enabled. 193 194 ### Required Parameters 195 196 Name | Type | Description | Notes 197 ------------- | ------------- | ------------- | ------------- 198 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 199 **lIVESTREAMID** | **string**| The live stream ID | 200 201 ### Return type 202 203 [**DisableLiveStreamResponse**](DisableLiveStreamResponse.md) 204 205 ### Authorization 206 207 [accessToken](../README.md#accessToken) 208 209 ### HTTP request headers 210 211 - **Content-Type**: Not defined 212 - **Accept**: application/json 213 214 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 215 216 # **EnableLiveStream** 217 > EnableLiveStreamResponse EnableLiveStream(ctx, lIVESTREAMID) 218 Enable a live stream 219 220 Enables a live stream, allowing it to accept an incoming RTMP stream. 221 222 ### Required Parameters 223 224 Name | Type | Description | Notes 225 ------------- | ------------- | ------------- | ------------- 226 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 227 **lIVESTREAMID** | **string**| The live stream ID | 228 229 ### Return type 230 231 [**EnableLiveStreamResponse**](EnableLiveStreamResponse.md) 232 233 ### Authorization 234 235 [accessToken](../README.md#accessToken) 236 237 ### HTTP request headers 238 239 - **Content-Type**: Not defined 240 - **Accept**: application/json 241 242 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 243 244 # **GetLiveStream** 245 > LiveStreamResponse GetLiveStream(ctx, lIVESTREAMID) 246 Retrieve a live stream 247 248 Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream. 249 250 ### Required Parameters 251 252 Name | Type | Description | Notes 253 ------------- | ------------- | ------------- | ------------- 254 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 255 **lIVESTREAMID** | **string**| The live stream ID | 256 257 ### Return type 258 259 [**LiveStreamResponse**](LiveStreamResponse.md) 260 261 ### Authorization 262 263 [accessToken](../README.md#accessToken) 264 265 ### HTTP request headers 266 267 - **Content-Type**: Not defined 268 - **Accept**: application/json 269 270 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 271 272 # **GetLiveStreamPlaybackId** 273 > GetLiveStreamPlaybackIdResponse GetLiveStreamPlaybackId(ctx, lIVESTREAMID, pLAYBACKID) 274 Retrieve a live stream playback ID 275 276 ### Required Parameters 277 278 Name | Type | Description | Notes 279 ------------- | ------------- | ------------- | ------------- 280 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 281 **lIVESTREAMID** | **string**| The live stream ID | 282 **pLAYBACKID** | **string**| The live stream's playback ID. | 283 284 ### Return type 285 286 [**GetLiveStreamPlaybackIdResponse**](GetLiveStreamPlaybackIDResponse.md) 287 288 ### Authorization 289 290 [accessToken](../README.md#accessToken) 291 292 ### HTTP request headers 293 294 - **Content-Type**: Not defined 295 - **Accept**: application/json 296 297 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 298 299 # **GetLiveStreamSimulcastTarget** 300 > SimulcastTargetResponse GetLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID) 301 Retrieve a Live Stream Simulcast Target 302 303 Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. 304 305 ### Required Parameters 306 307 Name | Type | Description | Notes 308 ------------- | ------------- | ------------- | ------------- 309 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 310 **lIVESTREAMID** | **string**| The live stream ID | 311 **sIMULCASTTARGETID** | **string**| The ID of the simulcast target. | 312 313 ### Return type 314 315 [**SimulcastTargetResponse**](SimulcastTargetResponse.md) 316 317 ### Authorization 318 319 [accessToken](../README.md#accessToken) 320 321 ### HTTP request headers 322 323 - **Content-Type**: Not defined 324 - **Accept**: application/json 325 326 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 327 328 # **ListLiveStreams** 329 > ListLiveStreamsResponse ListLiveStreams(ctx, optional) 330 List live streams 331 332 ### Required Parameters 333 334 Name | Type | Description | Notes 335 ------------- | ------------- | ------------- | ------------- 336 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 337 **optional** | ***ListLiveStreamsOpts** | optional parameters | nil if no parameters 338 339 ### Optional Parameters 340 Optional parameters are passed through a pointer to a ListLiveStreamsOpts struct 341 342 Name | Type | Description | Notes 343 ------------- | ------------- | ------------- | ------------- 344 **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] 345 **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] 346 **streamKey** | **optional.String**| Filter response to return live stream for this stream key only | 347 348 ### Return type 349 350 [**ListLiveStreamsResponse**](ListLiveStreamsResponse.md) 351 352 ### Authorization 353 354 [accessToken](../README.md#accessToken) 355 356 ### HTTP request headers 357 358 - **Content-Type**: Not defined 359 - **Accept**: application/json 360 361 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 362 363 # **ResetStreamKey** 364 > LiveStreamResponse ResetStreamKey(ctx, lIVESTREAMID) 365 Reset a live stream’s stream key 366 367 Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts. 368 369 ### Required Parameters 370 371 Name | Type | Description | Notes 372 ------------- | ------------- | ------------- | ------------- 373 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 374 **lIVESTREAMID** | **string**| The live stream ID | 375 376 ### Return type 377 378 [**LiveStreamResponse**](LiveStreamResponse.md) 379 380 ### Authorization 381 382 [accessToken](../README.md#accessToken) 383 384 ### HTTP request headers 385 386 - **Content-Type**: Not defined 387 - **Accept**: application/json 388 389 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 390 391 # **SignalLiveStreamComplete** 392 > SignalLiveStreamCompleteResponse SignalLiveStreamComplete(ctx, lIVESTREAMID) 393 Signal a live stream is finished 394 395 (Optional) End the live stream recording immediately instead of waiting for the reconnect_window. `EXT-X-ENDLIST` tag is added to the HLS manifest which notifies the player that this live stream is over. Mux does not close the encoder connection immediately. Encoders are often configured to re-establish connections immediately which would result in a new recorded asset. For this reason, Mux waits for 60s before closing the connection with the encoder. This 60s timeframe is meant to give encoder operators a chance to disconnect from their end. 396 397 ### Required Parameters 398 399 Name | Type | Description | Notes 400 ------------- | ------------- | ------------- | ------------- 401 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 402 **lIVESTREAMID** | **string**| The live stream ID | 403 404 ### Return type 405 406 [**SignalLiveStreamCompleteResponse**](SignalLiveStreamCompleteResponse.md) 407 408 ### Authorization 409 410 [accessToken](../README.md#accessToken) 411 412 ### HTTP request headers 413 414 - **Content-Type**: Not defined 415 - **Accept**: application/json 416 417 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 418 419 # **UpdateLiveStreamEmbeddedSubtitles** 420 > LiveStreamResponse UpdateLiveStreamEmbeddedSubtitles(ctx, lIVESTREAMID, updateLiveStreamEmbeddedSubtitlesRequest) 421 Update a live stream's embedded subtitles 422 423 Configures a live stream to receive embedded subtitles including captions and translations. 424 425 ### Required Parameters 426 427 Name | Type | Description | Notes 428 ------------- | ------------- | ------------- | ------------- 429 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 430 **lIVESTREAMID** | **string**| The live stream ID | 431 **updateLiveStreamEmbeddedSubtitlesRequest** | [**UpdateLiveStreamEmbeddedSubtitlesRequest**](UpdateLiveStreamEmbeddedSubtitlesRequest.md)| | 432 433 ### Return type 434 435 [**LiveStreamResponse**](LiveStreamResponse.md) 436 437 ### Authorization 438 439 [accessToken](../README.md#accessToken) 440 441 ### HTTP request headers 442 443 - **Content-Type**: application/json 444 - **Accept**: application/json 445 446 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 447