Learn how to configure Wowza Streaming EngineTM media server software so that Postman can run the Wowza Streaming Engine REST API OpenAPI (Swagger) reference documentation server. You'll then navigate the API reference through Postman rather than through a browser window.
- Download the Postman application and install it on the operating system of your choice.
- Install the Wowza Streaming Engine Swagger doc servlet locally by following the instructions in Access reference documentation for the Wowza Streaming Engine REST API.
- On the computer that's running Wowza Streaming Engine and the Swagger servlet, navigate to [install-dir]/conf/ and open Server.xml in a text editor.
- Locate the <DocumentationServerAuthenticationMethod> property in the <RESTInterface> section.
- Add the <DocumentationServerBasePath> property immediately after the <DocumentationServerAuthenticationMethod> property and specify / (forward slash), like this:
<DocumentationServerBasePath>/</DocumentationServerBasePath>
- Save your change.
- Restart Wowza Streaming Engine.
- Start Postman.
- In the Postman Builder window, choose GET for the method in the Enter request URL field, enter http://[wowza-ip-address]:8089/swagger.json, where [wowza-ip-address] with the IP address of your Wowza Streaming Engine server. For example, http://localhost:8089/swagger.json.
- Send the GET request to return reference documentation from the Swagger file. Using the path links in the response, you can navigate the reference documentation through Postman. See the following section for an example.
Example
When you send GET http://localhost:8089/swagger.json, the API returns links to the resource groups in the Wowza Streaming Engine REST API. To learn more about the endpoints for those groups, click any one of the links in the path field. A new GET request opens in Postman. When you send the populated GET request, details are returned for the endpoints within the group.
For example, if you send a request to GET http://localhost:8089/swagger.json, you'll get a response similar to this:
{ "swaggerVersion": "1.2", "apis": [ { "path": "/v2/servers/{serverName}/vhosts/{vhostName}/applications", "description": "Application Operations" } { "path": "/v2/machine/monitoring/current", "description": "Machine Level Current Statistics" } { "path": "/v2/machine/monitoring/historic", "description": "Machine Level Historic Statistics" } ... ] }
To drill into the Application Operations, click the path link for /v2/servers/{serverName}/vhosts/{vhostName}/applications. Postman opens a new request for GET http://localhost:8089/v2/servers/{serverName}/vhosts/{vhostName}/applications. Sending that GET request results in specific endpoint documentation being returned, similar to this response:
{ "swaggerVersion": "1.2", "basePath": "http://localhost:8087", "apis": [ { "path": "/v2/servers/{serverName}/vhosts/{vhostName}/applications", "operations": [ { "type": "ApplicationsConfig", "method": "GET", "nickname": "getApplicationsConfig", "parameters": [ { "type": "string", "defaultValue": "_defaultServer", "uniqueItems": "false", "name": "servername", "paramType": "path", "description": "Reserved for future use", "required": "true", "allowMultiple": "false", } ... ] } ] ... } }