How to create and manage stream targets by using the Wowza Streaming Engine REST API

You can use the Wowza Streaming Engine™ media server software REST API to identify and manage stream targets in a Wowza Streaming Engine instance.



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

Get a list of stream targets

View a list of stream targets for an application (live, in this example):

curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries

Create a stream target

Create a stream target for the Wowza Streaming Engine live application for an RTMP destination:

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d'
   "serverName": "_defaultServer_",
   "sourceStreamName": "myStream",
   "entryName": "ppsource",
   "profile": "rtmp",
   "host": "localhost",
   "application": "live",
   "userName": "testUser",
   "password": "pass",
   "streamName": "myStream"

Remove a stream target

Delete a stream target:

curl -X DELETE --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource

If you're having problems or want to discuss this article, post in our forum.