• How to use cURL to query the Wowza Streaming Engine REST API

    This article provides an overview of the REST API query examples that demonstrate how to query the Wowza Streaming Engine™ REST service. This is meant to further illustrate the use of our REST API and provide some insight on how you can leverage your Wowza Streaming Engine media server software remotely. To get a complete breakdown and documentation of the API, see How to access documentation for the Wowza Streaming Engine REST API.

    • Wowza Streaming Engine™ 4.3 or later is required. You must also have working knowledge of cURL and REST-related services.

    • For a video overview of the Wowza Streaming Engine REST API including the benefits of REST, how to get started and query the Wowza Streaming Engine REST service, and other helpful tips, see our recorded Wowza Streaming Engine REST API Webinar.
    The cURL requests in the REST API query examples articles use one of the following verbs:

    • GET - Obtain information from the REST service.

    • PUT - Update information or perform an action on an existing record.

    • POST - Create a new record.

    • DELETE - Remove an existing record.

    Each request passes the Accept and charset headers, as follows:
    --header 'Accept:application/json; charset=utf-8'
    These articles use and expect JSON responses. If you want an XML response instead, you can modify these headers, similar to the following:
    --header 'Accept:application/xml; charset=utf-8' 
    --header 'Content-type:application/xml; charset=utf-8'
    In these articles, the following general format is used for a request:
    curl -X (VERB) (Headers) http://[your-wowza-server]:8087/v2/[path-to-resource]
    For example:
    curl -X VERB Headers http://[your-wowza-server]:8087/v2/servers/_defaultServer_/(publishers|streamfiles|etc)
    curl -X VERB Headers http://[your-wowza-server]:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/(AppName)/(for example, Streamfiles, etc.)
    The query examples have the REST service set to no authentication in the Server.xml file:
    If you set the authentication method to digest, you'll want to add that to part of the cURL request, as follows:
    curl --digest -u "user:pass" -X (VERB) (Headers) http://[your-wowza-server]:8087/v2/[path-to-resource]
    If you're ready to get started, see the following cURL query examples that cover a variety of tasks and applications:

    Originally Published: For Wowza Streaming Engine 4.2.0 on 06-16-2015.
    Updated: For Wowza Streaming Engine 4.3.0 on 10-06-2015.

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