All URIs are relative to https://api.mux.com, except if the operation defines another base path.
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($create_web_input_request): \MuxPhp\Models\WebInputResponse
Create a new Web Input
Create a new Web Input
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
// This API method wants a \MuxPhp\Models\CreateWebInputRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\CreateWebInputRequest" directly.
$create_web_input_request = json_decode('{"url":"https://example.com/hello.html","live_stream_id":"ZEBrNTpHC02iUah025KM3te6ylM7W4S4silsrFtUkn3Ag"}',true); // \MuxPhp\Models\CreateWebInputRequest
try {
$result = $apiInstance->createWebInput($create_web_input_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->createWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
create_web_input_request | \MuxPhp\Models\CreateWebInputRequest |
\MuxPhp\Models\WebInputResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteWebInput($web_input_id)
Delete a Web Input
Deletes a Web Input and all its data
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
try {
$apiInstance->deleteWebInput($web_input_id);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->deleteWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWebInput($web_input_id): \MuxPhp\Models\WebInputResponse
Retrieve a Web Input
Retrieve a single Web Input's info
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
try {
$result = $apiInstance->getWebInput($web_input_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->getWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID |
\MuxPhp\Models\WebInputResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
launchWebInput($web_input_id): \MuxPhp\Models\LaunchWebInputResponse
Launch a Web Input
Launches the browsers instance, loads the URL specified, and then starts streaming to the specified Live Stream.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
try {
$result = $apiInstance->launchWebInput($web_input_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->launchWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID |
\MuxPhp\Models\LaunchWebInputResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listWebInputs($limit, $page): \MuxPhp\Models\ListWebInputsResponse
List Web Inputs
List Web Inputs
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 25; // int | Number of items to include in the response
$page = 1; // int | Offset by this many pages, of the size of `limit`
try {
$result = $apiInstance->listWebInputs($limit, $page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->listWebInputs: ', $e->getMessage(), PHP_EOL;
}
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] |
\MuxPhp\Models\ListWebInputsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
reloadWebInput($web_input_id): \MuxPhp\Models\ReloadWebInputResponse
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
try {
$result = $apiInstance->reloadWebInput($web_input_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->reloadWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID |
\MuxPhp\Models\ReloadWebInputResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
shutdownWebInput($web_input_id): \MuxPhp\Models\ShutdownWebInputResponse
Shut down a Web Input
Ends streaming to the specified Live Stream, and then shuts down the Web Input browser instance.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
try {
$result = $apiInstance->shutdownWebInput($web_input_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->shutdownWebInput: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID |
\MuxPhp\Models\ShutdownWebInputResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateWebInputUrl($web_input_id, $update_web_input_url_request): \MuxPhp\Models\WebInputResponse
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\WebInputsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$web_input_id = abcd1234; // string | The Web Input ID
// This API method wants a \MuxPhp\Models\UpdateWebInputUrlRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\UpdateWebInputUrlRequest" directly.
$update_web_input_url_request = json_decode('{"url":"https://example.com/hello-there.html"}',true); // \MuxPhp\Models\UpdateWebInputUrlRequest
try {
$result = $apiInstance->updateWebInputUrl($web_input_id, $update_web_input_url_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebInputsApi->updateWebInputUrl: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
web_input_id | string | The Web Input ID | |
update_web_input_url_request | \MuxPhp\Models\UpdateWebInputUrlRequest |
\MuxPhp\Models\WebInputResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]