Stream targets PHP query examples for the Wowza Streaming Engine REST API

Wowza Streaming Engine media server software includes a REST Application Programming Interface (API) that you can use to configure, manage, and monitor the media server through HTTP requests. This article describes how to identify and manage stream targets in a Wowza Streaming Engine media server by using PHP to query the Wowza Streaming Engine REST service.

Notes:

Contents


Get a list of stream targets
Create a stream target
Remove a stream target
For developers

Get a list of stream targets


To get a list of the currently-defined stream targets, use the following request. This example requests stream target information from an application named live.
$sf = new Com\Wowza\StreamTarget("live");
$response = $sf->getAll();

Create a stream target


To create a stream target, use the following request. An RTMP profile and a stream named myStream are used in this example, but you can create stream targets with other profiles in a similar way.
$sf = new Com\Wowza\StreamTarget("live");
$response = $sf->create("myStream","ppsource","rtmp","locahost",null, null,"myStream");

Remove a stream target


When you're finished with a stream target, delete it with the following request:
$sf = new Com\Wowza\StreamTarget("live");
$response = $sf->remove("ppsource");

For developers


Source code is available on GitHub.

Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.