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 |
WebInputResponse createWebInput(createWebInputRequest).execute();
Create a new Web Input
Create a new Web Input
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
CreateWebInputRequest createWebInputRequest = {"url":"https://example.com/hello.html","live_stream_id":"ZEBrNTpHC02iUah025KM3te6ylM7W4S4silsrFtUkn3Ag"}; // CreateWebInputRequest |
try {
WebInputResponse result = apiInstance.createWebInput(createWebInputRequest)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#createWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createWebInputRequest | CreateWebInputRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Web Input Created | - |
deleteWebInput(WEB_INPUT_ID).execute();
Delete a Web Input
Deletes a Web Input and all its data
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
try {
apiInstance.deleteWebInput(WEB_INPUT_ID)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#deleteWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
WebInputResponse getWebInput(WEB_INPUT_ID).execute();
Retrieve a Web Input
Retrieve a single Web Input's info
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
try {
WebInputResponse result = apiInstance.getWebInput(WEB_INPUT_ID)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#getWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
LaunchWebInputResponse launchWebInput(WEB_INPUT_ID).execute();
Launch a Web Input
Launches the browsers instance, loads the URL specified, and then starts streaming to the specified Live Stream.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
try {
LaunchWebInputResponse result = apiInstance.launchWebInput(WEB_INPUT_ID)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#launchWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ListWebInputsResponse listWebInputs().limit(limit).page(page).execute();
List Web Inputs
List Web Inputs
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
Integer limit = 25; // Integer | Number of items to include in the response
Integer page = 1; // Integer | Offset by this many pages, of the size of `limit`
try {
ListWebInputsResponse result = apiInstance.listWebInputs()
.limit(limit)
.page(page)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#listWebInputs");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | Number of items to include in the response | [optional] [default to 25] |
page | Integer | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ReloadWebInputResponse reloadWebInput(WEB_INPUT_ID).execute();
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.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
try {
ReloadWebInputResponse result = apiInstance.reloadWebInput(WEB_INPUT_ID)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#reloadWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ShutdownWebInputResponse shutdownWebInput(WEB_INPUT_ID).execute();
Shut down a Web Input
Ends streaming to the specified Live Stream, and then shuts down the Web Input browser instance.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
try {
ShutdownWebInputResponse result = apiInstance.shutdownWebInput(WEB_INPUT_ID)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#shutdownWebInput");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
WebInputResponse updateWebInputUrl(WEB_INPUT_ID, updateWebInputUrlRequest).execute();
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.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.WebInputsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
WebInputsApi apiInstance = new WebInputsApi(defaultClient);
String WEB_INPUT_ID = "abcd1234"; // String | The Web Input ID
UpdateWebInputUrlRequest updateWebInputUrlRequest = {"url":"https://example.com/hello-there.html"}; // UpdateWebInputUrlRequest |
try {
WebInputResponse result = apiInstance.updateWebInputUrl(WEB_INPUT_ID, updateWebInputUrlRequest)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebInputsApi#updateWebInputUrl");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
WEB_INPUT_ID | String | The Web Input ID | |
updateWebInputUrlRequest | UpdateWebInputUrlRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |