Skip to content

Latest commit

 

History

History
619 lines (471 loc) · 18.1 KB

WebInputsApi.md

File metadata and controls

619 lines (471 loc) · 18.1 KB

Mux.Csharp.Sdk.Api.WebInputsApi

All URIs are relative to https://api.mux.com

Method HTTP request Description
CreateWebInput POST /video/v1/web-inputs Create a new Web Input
DeleteWebInput DELETE /video/v1/web-inputs/{WEB_INPUT_ID} Delete a Web Input
GetWebInput GET /video/v1/web-inputs/{WEB_INPUT_ID} Retrieve a Web Input
LaunchWebInput PUT /video/v1/web-inputs/{WEB_INPUT_ID}/launch Launch a Web Input
ListWebInputs GET /video/v1/web-inputs List Web Inputs
ReloadWebInput PUT /video/v1/web-inputs/{WEB_INPUT_ID}/reload Reload a Web Input
ShutdownWebInput PUT /video/v1/web-inputs/{WEB_INPUT_ID}/shutdown Shut down a Web Input
UpdateWebInputUrl PUT /video/v1/web-inputs/{WEB_INPUT_ID}/url Update Web Input URL

CreateWebInput

WebInputResponse CreateWebInput (CreateWebInputRequest createWebInputRequest)

Create a new Web Input

Create a new Web Input

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class CreateWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var createWebInputRequest = new CreateWebInputRequest(); // CreateWebInputRequest | 

            try
            {
                // Create a new Web Input
                WebInputResponse result = apiInstance.CreateWebInput(createWebInputRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.CreateWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
createWebInputRequest CreateWebInputRequest

Return type

WebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Web Input Created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteWebInput

void DeleteWebInput (string WEB_INPUT_ID)

Delete a Web Input

Deletes a Web Input and all its data

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class DeleteWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID

            try
            {
                // Delete a Web Input
                apiInstance.DeleteWebInput(WEB_INPUT_ID);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.DeleteWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID

Return type

void (empty response body)

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWebInput

WebInputResponse GetWebInput (string WEB_INPUT_ID)

Retrieve a Web Input

Retrieve a single Web Input's info

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class GetWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID

            try
            {
                // Retrieve a Web Input
                WebInputResponse result = apiInstance.GetWebInput(WEB_INPUT_ID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.GetWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID

Return type

WebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

LaunchWebInput

LaunchWebInputResponse LaunchWebInput (string WEB_INPUT_ID)

Launch a Web Input

Launches the browsers instance, loads the URL specified, and then starts streaming to the specified Live Stream.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class LaunchWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID

            try
            {
                // Launch a Web Input
                LaunchWebInputResponse result = apiInstance.LaunchWebInput(WEB_INPUT_ID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.LaunchWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID

Return type

LaunchWebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListWebInputs

ListWebInputsResponse ListWebInputs (int? limit = null, int? page = null)

List Web Inputs

List Web Inputs

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class ListWebInputsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var limit = 25;  // int? | Number of items to include in the response (optional)  (default to 25)
            var page = 1;  // int? | Offset by this many pages, of the size of `limit` (optional)  (default to 1)

            try
            {
                // List Web Inputs
                ListWebInputsResponse result = apiInstance.ListWebInputs(limit, page);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.ListWebInputs: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
limit int? Number of items to include in the response [optional] [default to 25]
page int? Offset by this many pages, of the size of `limit` [optional] [default to 1]

Return type

ListWebInputsResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReloadWebInput

ReloadWebInputResponse ReloadWebInput (string WEB_INPUT_ID)

Reload a Web Input

Reloads the page that a Web Input is displaying. Note: Using this when the Web Input is streaming will display the page reloading.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class ReloadWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID

            try
            {
                // Reload a Web Input
                ReloadWebInputResponse result = apiInstance.ReloadWebInput(WEB_INPUT_ID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.ReloadWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID

Return type

ReloadWebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ShutdownWebInput

ShutdownWebInputResponse ShutdownWebInput (string WEB_INPUT_ID)

Shut down a Web Input

Ends streaming to the specified Live Stream, and then shuts down the Web Input browser instance.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class ShutdownWebInputExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID

            try
            {
                // Shut down a Web Input
                ShutdownWebInputResponse result = apiInstance.ShutdownWebInput(WEB_INPUT_ID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.ShutdownWebInput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID

Return type

ShutdownWebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateWebInputUrl

WebInputResponse UpdateWebInputUrl (string WEB_INPUT_ID, UpdateWebInputUrlRequest updateWebInputUrlRequest)

Update Web Input URL

Changes the URL that a Web Input loads when it launches. Note: This can only be called when the Web Input is idle.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class UpdateWebInputUrlExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new WebInputsApi(config);
            var WEB_INPUT_ID = abcd1234;  // string | The Web Input ID
            var updateWebInputUrlRequest = new UpdateWebInputUrlRequest(); // UpdateWebInputUrlRequest | 

            try
            {
                // Update Web Input URL
                WebInputResponse result = apiInstance.UpdateWebInputUrl(WEB_INPUT_ID, updateWebInputUrlRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebInputsApi.UpdateWebInputUrl: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
WEB_INPUT_ID string The Web Input ID
updateWebInputUrlRequest UpdateWebInputUrlRequest

Return type

WebInputResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]