• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Developer Dojo /
  • Wowza Streaming Engine REST API /
avatar image
Question by Umut Tufanoglu · Sep 27, 2017 at 01:52 PM · wowza streaming enginewowza streaming engine rest api

Wowza Access to Api does not work

Hi,

I am trying to use the Wowza Api for Wowza streaming engine.
I installed this library https://github.com/WowzaMediaSystems/wse-rest-library-php with composer.
I set up the constants for the config and created the setup programming but somehow it returns me null.

These are currently my constants:

'WOWZA_HOST', 'http://35.158.34.28:8088',
'WOWZA_URL' => '35.158.34.28','WOWZA_PORT' => '8088','WOWZA_SERVER_INSTANCE' => '_defaultServer_','WOWZA_VHOST_INSTANCE' => '_defaultVHost_','WOWZA_USERNAME' => 'wowza','WOWZA_PASSWORD' => 'mypassword'The config should be ok, but I am not sure what to insert to WOWZA_SERVER_INSTANCE AND WOWZA_VHOST_INSTANCE

The config should be ok, but I am not sure what to insert to WOWZA_SERVER_INSTANCE AND WOWZA_VHOST_INSTANCE

The php setup looks like this:

$setup = new \Com\Wowza\Entities\Application\Helpers\Settings();
$setup->setHost($host); 
$setup->setUsername($username);
$setup->setPassword($password);// Connect to the server or deal with statistics NOTICE THE CAPS IN COM AND WOWZA

$server = new \Com\Wowza\Server($setup);
$sf = new \Com\Wowza\Statistics($setup);
$response = $sf->getServerStatistics($server); $setup->setPassword($password);

// Connect to the server or deal with statistics NOTICE THE CAPS IN COM AND WOWZA

$server = new \Com\Wowza\Server($setup);
$sf = new \Com\Wowza\Statistics($setup);
$response = $sf->getServerStatistics($server);
var_dump($response); // this returns NULL



I am not sure what I am missing, the namespaces should be correct, I get no error with them.
Furthermore we are using AWS to run the streaming engine thus I use the php framework laravel if that makes a difference.

Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Michelle B · Sep 30, 2017 at 01:58 AM

Hi,

When querying the Wowza Streaming Engine REST API, you should be using port 8087, or whichever port is configured in your conf/Server.xml RESTInterface. Port 8088 by default is used to access your Manager UI. Please try changing your constants to use port 8087 and see if you continue to run into an issue.

Michelle

Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Umut Tufanoglu · Oct 10, 2017 at 09:57 AM 0
Share

Did you already have a look at the xml content?

avatar image

Answer by Umut Tufanoglu · Oct 04, 2017 at 07:30 AM

Hi I changed to port to 8087, and my I get following output if I var_dump($response):

JSON REQUEST to http://35.158.34.28:8087/servers/_defaultServer_/monitoring/historic with verb GET: {"restURI":"http:\/\/35.158.34.28:8087\/servers\/_defaultServer_\/monitoring\/historic","settings":{}} RETURN: NULL
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Umut Tufanoglu · Oct 04, 2017 at 08:17 AM 0
Share

I checked my conf/Server.xml and the port is 8087 but it still does not work.

My conf/Server.xml looks like this:
(I could not paste the xml here since it exceeds the number of characters to I create a kopy.io snippet)

https://kopy.io/vCHFn
avatar image

Answer by Umut Tufanoglu · Oct 10, 2017 at 09:57 AM

Hi again,

I posted a copy of the xml file in my server and further information did you already have a look at it ? :)

Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

see what is playing the Wowza Server by Rest of an API 0 Answers

Wowza cannot access Media Engine Api 1 Answer

how to delete application using rest api 1 Answer

RESTInterface/EnableXMLFile configuration directive 2 Answers

Json Response Content-Type of REST API 1 Answer

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges