How to access reference documentation for the Wowza Streaming Engine REST API

Reference documentation for the Wowza Streaming Engine™ media server software REST API is available through the open-source Swagger 1.2 framework. Swagger presents the documentation, which describes every resource and operation in the API, on a single webpage represented using the JSON Schema.

To use the Wowza Streaming Engine REST API reference documentation, you must enable the documentation server that comes with your Wowza Streaming Engine instance. Then you can download and view the content locally.

Notes:
  • Wowza Streaming Engine 4.3.0 or later is required.
     
  • A Subscription or Perpetual license for Wowza Streaming Engine includes access to the REST API. A separate license is not required.

Configure the Wowza Streaming Engine REST API documentation server


Wowza Streaming Engine software includes a documentation server, or servlet, that provides the REST API reference documentation through a Swagger-based webpage. The documentation server is disabled by default. To use it, you must enable the servlet and disable servlet authentication in your instance's Server.xml file.

  1. On the computer with Wowza Streaming Engine installed, go to [install-dir]/conf and open Server.xml file in a text editor.
  2. Locate the <DocumentationServerEnable> property in the <RESTInterface> section and specify true, like this:
    <DocumentationServerEnable>true</DocumentationServerEnable>

Note: By default, the documentation server uses port 8089. To use a different port, change <DocumentationServerPort>8089</DocumentationServerPort> to <DocumentationServerPort>[port-number]</DocumentationServerPort>.

  1. Locate the <DocumentationServerAuthenticationMethod> property and specify none, like this:
<DocumentationServerAuthenticationMethod>none</DocumentationServerAuthenticationMethod>

Note: The documentation server uses CORS headers. If you're using Wowza Streaming Engine 4.5.0 or later, CORS is enabled by default. If you're using Wowza Streaming Engine 4.3.0 or 4.4.x, you must enable CORS by adding the <restUserHTTPHeaders> property to the <RESTInterface>/<Properties> section of the Server.xml file, like this:

<Properties>
<Property>
    <Name>restUserHTTPHeaders</Name>
    <Value>Access-Control-Allow-Origin:*|Access-Control-Allow-Methods:OPTIONS,GET,PUT,DELETE,POST|Access-Control-Allow-Headers:Content-Type</Value>
</Property>
</Properties>

For more information, see How to add HTTP headers to Wowza Streaming Engine REST API responses.

Finally, to use the Try it out! buttons to execute queries from within Swagger, you must turn off API authentication.

  1. Locate the <AuthenticationMethod> property and specify none, like this:
<AuthenticationMethod>none</AuthenticationMethod>
  1. Restart Wowza Streaming Engine.

Download and view the documentation


After you've configured Wowza Streaming Engine to use the documentation server, you can download and view the content.

Note: Wowza Streaming Engine must be running in order to open the Swagger doc.

  1. Download the Swagger webpage and content.
  2. Extract the zipped contents of the download to any location on your computer.
     
  3. Go to [package-root] and open index.html in a web browser.
     
  4. In the upper-right corner of the index.html webpage, enter the URL of the Wowza Streaming Engine server that has the REST API documentation servlet enabled, for example:
    http://[wowza-ip-address]:8089/api-docs
  5. Click Explore.

Note: To access the REST API documentation server on a remote Wowza Streaming Engine instance, do the following:

  1. On the computer that has the Wowza Streaming Engine REST API documentation you want to view, open Server.xml in a text editor and add the remote computer's IP address to the <RESTInterface>/<IPWhiteList> property. For details on configuring the <IPWhiteList> property, see Connect to remote Streaming Engine from local Streaming Engine Manager.
  2. Restart Wowza Streaming Engine.
  3. On the computer where you've downloaded the Swagger content, open the index.html webpage and enter the URL of the Wowza Streaming Engine server that has the REST API that you want to view using the following format: http://[wowza-ip-address]:8089/api-docs.

More resources



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