Source Authentication In Wowza Using REST API

Posted By : Vipin Pokhriyal | 23-Mar-2018

Set up authentication to help secure RTMP-based and RTSP-based source connections to the server.

1).Firstly you should have To install Wowza into your local system for this configuration where you want to perform these following operations.

2).After successfully installation Wowza you should have to login into Wowza, after login you can follow the instruction.

 

a) How to Get Live Stream Sources (publisher)

Follow the command for view the live Stream Source

Input:-

curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf8'http://localhost:8087/v3/servers/_defaultServer_/publishers

 

 

Outputs:-

Using command line The command response like this:

{
"serverName":"_defaultServer_",
"publishers":[{"publisher":"vipin"},
{"publisher":"myRTMPencoder"}]
}

Using Postman The command response like this if you hit the URL:

<?xml version="1.0" encoding="UTF-8" ?>
<Publishers3 serverName="_defaultServer_">
<Publisher>
<publisher>vipin</publisher>
</Publisher>
</Publishers3>

 

 

b) How to Create Live Stream Source (publisher)

Follow the post command to Create live Stream Source

Input:

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/publishers -d'
{
"name": "Test",
"password": "xyz",
"description": "write discription here",
"serverName": "",
"version": "3"
}'

 

 

Outputs:-
Using command Line It shows response like this:-

{
"success":true,
"message":"",
"data":null
}

 

 

Using Postman The command response like this :

<?xml version="1.0" encoding="UTF-8" ?>
<wmsResponse>
<success>true</success>
<message></message>
</wmsResponse>

 

 

c) Remove a live Stream Source (publisher):-

Follow the delete request you can delete live Source(Publisher):-

Input:-

curl -X DELETE --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8'http://localhost:8087/v3/servers/_defaultServer_/publishers/Test

 

Output:

The API will response like this using command line:

{
"success":true,
"message":"Saved",
"data":null
}

 

The api will response using postman:-

<?xml version="1.0" encoding="UTF-8" ?>
<wmsResponse>
<success>true</success>
<message>Saved</message>
</wmsResponse>

 

 

Also, you can check these things into your UI


1) Select Server Option into Wowza Streaming Engine Manager.
2) After that go to Source Authentication, here You can check your Stream Source which is created and deleted. For Better Understanding You can also perform these operation from you UI Before Using These REST API.

 

 

 

 

About Author

Author Image
Vipin Pokhriyal

Vipin is Qualified in Master in computer Applicatins. He is an Active team player & having skills as Java Developer.

Request for Proposal

Name is required

Comment is required

Sending message..