Trial the Wowza Video REST API using Postman

Easy access to REST API testing is an important factor in choosing a product to integrate into your video streaming solution. To simplify the testing process, we provide OpenAPI specifications in our API reference documentation that you can download and import into Postman.

This topic walks you through that process as well as provides our suggestions for setting up your collection based on our OpenAPI spec format.

Before you start

You should have:

  • A Wowza Video account so you can generate a personal access token to send requests to the API. If you don't have an account and want to use the free trial, see Wowza Video free trial for more information including trial limitations.
  • Postman to make calls to the Wowza Video REST API. If you don't have Postman installed already, refer to their documentation to complete the installation. This topic uses Postman v 9.20.3. If you use a different version, the steps in this topic might not match the user interface.

1. Get your access token


You'll use an access token, also called a JSON Web Token, to authenticate yourself when you make calls to the REST API. The token identifies the Wowza Video account and specific user making the API requests.

Generate the token in the Wowza Video user interface.

  1. In the menu bar, click your user name and choose Account Settings.
  2. Make sure you're on the API Access tab, then click Token Management in the Wowza API Authentication is Changing banner.
     
  3. In the Token Management portal, add a new token. To test an API, you can create and use a personal access token. Integrations in production environments should use a system access token for authentication.

    Make sure you copy the token and store it in a safe location; you won't see the token again later and you need it for the next steps.

2. Download the OpenAPI spec

We make it easy to trial and test out our entire REST API by providing an OpenAPI specification you can import into Postman as a collection with pre-populated paths, variables, and more. You'll also be able to use Postman's Documentation and Code tabs to help you learn more about the API and get our request sample code in additional languages that Postman supports.

We recommend trialing the following API versions:

  • Current — This version offers the most complete, up-to-date, tested, and stable code base. We strongly recommend using the current version in your production environment.
  • Beta — This version contains everything that's in the current version as well as some features and functionality that are still in development. These work-in-progress features aren't fully tested and are subject to change. When we're done testing, we'll promote the beta version to the current version and then create a new beta with new features. You're free to use the beta version for testing and evaluation, but beta versions aren't intended for use in production environments and we caution against using a beta in production.
  1. Navigate to the reference documentation for the API version you want to evaluate:
  2. Click Download.

3. Import the OpenAPI spec into Postman

You'll import the OpenAPI spec into Postman to create a collection of all the requests you can make to our REST API. If you have any trouble locating objects in the Postman UI, consult their documentation for help.

  1. In Postman, click Import.
  2. Drag the OpenAPI spec you downloaded into the File tab of the Import dialog box.
  3. When asked to confirm your import:
    • Click Generate collection from imported APIs and select to link the collection as a Test Suite.
    • Click Show advanced settings and make sure:

It will take Postman a few minutes to import the OpenAPI spec as a collection. The Postman UI will notify you when the upload is complete and you'll see your new collection on the Collections tab. If you'll be importing multiple OpenAPI specs, consider renaming the collection to differentiate the versions.

4. Configure the Authorization method for the collection

To send requests, you'll need to set the Authorization method to Bearer Token and add your access token. Every request in the collection will use this authentication method.

  1. Select the Collections tab.
  2. Select the collection you want to use, then click the Authorization tab on the pane that opens.
  3. Select Bearer Token from the Type pull-down.
  4. Add your access token in the Token field.
  5. Click the Save icon.

On the Variables tab, you can see that the baseURL is already populated for you and reflects the version of the OpenAPI spec you imported. This variable is used in the URL of all the API requests in the collection.

5. Send API requests

You're now ready to send API requests using the Postman collection you imported! Let's create a new live stream as an example.

  1. In the live_streams folder of the collection, select POST Create a live stream
  2. Open the Body tab to see the required parameters that will create the live stream. In this case, we're creating a WebRTC stream, similar to what you see below.
    '{
       "live_stream": {
         "aspect_ratio_height": 720,
         "aspect_ratio_width": 1280,
         "billing_mode": "pay_as_you_go",
         "broadcast_location": "us_west_oregon",
         "encoder": "other_webrtc",
         "name": "MyLiveStream",
         "transcoder_type": "transcoded"
       }
    }
    
  3. Click Send.

A successful request for this sample will return a 201 Created status and data about the object created in the response body. In particular, you want to make note of the object ID that's returned. You'll usually use those in subsequent calls to complete actions on those objects, like starting the live stream.

Tip: For requests that complete an action on an object, like starting a live stream or fetching the details of a specific live stream, you'll need to provide object IDs in the URL. You can do this by setting the id variable on the Params tab.


 

Next steps

You created a live stream as part of this tutorial to make sure your collection is set up and working. If you want more guidance for what requests to make to get a live stream started, see Start live streaming using the Wowza Video REST API.

You might also want to explore our other Postman collections created for our Video Series: Using the Wowza Video REST API, located here: https://github.com/WowzaMediaSystems/wowza-video-api-demos-postman.

More resources

  • Authentication  — Learn more about authenticating REST API calls in Wowza Video.