Using the Wowza ClearCaster GraphQL API
The Wowza ClearCaster GraphQL API allows content distributors to manage broadcasts directly via the interface. In this video, Justin demonstrates how to create your API key, run queries in GraphiQL, set up Postman to run queries, and create a broadcast in this video.
For a more detailed tutorial, check out our documentation.
Full Video Transcript
Justin Miller:
Wowza ClearCaster allows you to manage your ClearCasters and broadcasts using the GraphQL API. To get started, we’ll first need to log in to the Wowza ClearCaster Universal Manager. In universal mode, go under Manage and select the Integrations tab. Here, we can generate a new ClearCaster API key. Once we’ve entered a name for the API key, we’ll generate the API key, secret key, and GraphiQL URL. Copy this information before closing the window as we won’t be able to access this information again.
In a new browser window, we can use the GraphiQL URL to explore and use the GraphQL API. The interface automatically uses your account-specific API key and secret key. For assistance, you may want to open the docs. We’ll use this Documentation Explorer to find our namespace ID. It looks like allNamespaces is what we need, so we’ll create the query allNamespaces to find both the ID and the name. We’ll execute the query by hitting play and the results will show up on the right-hand side window. We’ll store this to use later to create a broadcast.
We can also do the same search to find the encoder ID. Using allEncoders, we’ll create a similar query, and then, once we have the results, we’ll store them once again to create a broadcast later. For those who want to test in a local instance of Postman, you’ll need to get started by going under the launchpad tab and creating a new request. The request will use Post with the request URL listed below. To run a GraphQL query, under the Body tab, the radio button for GraphQL Beta needs to be checked and there are also a few other necessary steps to pre-write our off header in order to send the request. You can find this script on GitHub from the URL list below. Once you’ve copied this information, go under the Pre-Request Script tab and enter in the script.
You’ll need to add your account-specific API key as well as your secret key as part of the script. Then under the Headers tab, you’ll need to add two key pair values. One is Authorization with the value of {{authorizationHeader}} and the second is X-Date with the value of {{timeNow}}. Now we’re ready to run our query in Postman, but instead we’ll actually be creating a broadcast for ClearCaster. For this, we’ll be referencing the help documentation on using the Wowza ClearCaster GraphQL API.
Go directly to Create a broadcast and here you can copy the code shown by clicking twice on the Copy button. Back in Postman, you’ll paste this information under the Body tab within the Query window. From our earlier queries, we’ll replace the your namespace ID and your encoder ID with the IDs of the information we collected. We’ll also change the broadcast name to be something unique. Once we’re ready, we’ll execute by hitting Send. A confirmation that the broadcast was made will show up in the bottom window and we can confirm that this was made by going into Wowza ClearCaster Universal Manager once again and verifying the broadcast was created. All right. That’s it for using the Wowza ClearCaster GraphQL API. Thanks for streaming and have a great day.