Get started querying an ultra low latency stream using the Wowza Streaming Cloud REST API

Learn how to use the Wowza Streaming Cloud™ service's REST API to gather information about an existing ultra low latency stream target, update its configuration, and delete it.

Note: For information on the Wowza Streaming Cloud free trial and its feature limitations, see Wowza Streaming Cloud free trial.

Add a target and source


Before using the Wowza Streaming Cloud REST API to query and update an ultra low latency stream target, first add a target with the user interface and connect a video source.

See Get started with Wowza Streaming Cloud ultra low latency streaming or follow these steps:

  1. Click Advanced on the menu bar, and then click Stream Targets.
  2. Click Add Target, select Wowza CDN - Ultra Low Latency, and then click Add.
  3. On the Add a Wowza CDN - ULL target page, specify the following:
    • Target Name – A short, descriptive identifier for the target that differentiates it from other targets in Wowza Streaming Cloud. A Target Name is required, doesn't have to be unique, and can't exceed 255 characters.
    • Source Delivery Method – Select Push for the source to push the stream to the target. Select Pull for the target to pull the stream from the source.
    • Source URL – Only for ultra low latency stream targets whose Source Delivery Method is Pull. The URL of the source IP camera or encoder connecting to the stream target. The hostname or IP address used in the Source URL must be publicly accessible. For help determining the correct Source URL, see the encoder or IP camera's documentation.
    • Apple HLS Playback Stream – (Optional) Select Enable HLS Fallback Stream to create an Apple HLS playback URL that can be used to view the stream on mobile devices or to provide redundancy in the event that WebSocket connection attempts fail.
    • Enabled? – Select Enable this target to allow the source stream to be immediately ingested by the target's origin server. Select Do NOT enable if you prefer to set up the target and encoder first, then enable ingest at a later time.
  4. Click Add.

If you haven't yet added and started a video source, see Configure your video source.

Locate your API key and access key


For security, all requests to the Wowza Streaming Cloud REST API must include an API key and an access key, which authenticate your requests to the Wowza Streaming Cloud service.

Both the API key and the access key can be found in the Wowza Streaming Cloud web manager.

  1. In the menu bar, click your user name and choose API Access.

Your API key appears in the middle of the Wowza Streaming Cloud REST API page.
Access keys are listed in the Access Keys panel on the left side of the page.

  1. To generate a new access key, click Add Access Key.
  2. Leave Enabled selected so that the key is immediately available, and provide an optional Description. Then, click Add.

Wowza Streaming Cloud generates the key.

You can disable and re-enable the access key at any time, and edit the description.

Important: In example requests shown in our example articles—and in your own code—for [key], substitute your API key or your access key, as appropriate.

Query for basic information about the stream target


Now that you have an API key and access key, use the following example requests to find details about the ultra low latency stream. Example requests are presented in curl, but you can also use a GUI REST client for API testing such as Postman or Paw.

If you have basic questions about using a REST API, start with About the Wowza Streaming Cloud REST API.

Notes:
  • Ultra low latency stream targets are not available in the sandbox environment, so be sure to use https://api.cloud.wowza.com not https://api-sandbox.cloud.wowza.com in your API request.
  • For [key], substitute your API key or your access key as appropriate.
  • For [version], substitute the version number of the API that you're using. For the current version, use v1.2.
  • Query for all ultra low latency stream targets in your account to find the details of your existing target. You'll need the ID of your ultra low latency target to do additional requests.

    Fetch all ultra low latency stream targets:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull"
  • Fetch a single ultra low latency stream target:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

Query for ultra low latency stream metrics


Stream metrics show connection data for the stream target's origin server, including the average inbound bitrate of the stream and the number of dropped connections. Use the following example requests to view stream metrics.

  • Get connection metrics for an ultra low latency stream target for the most recent 10 minutes that it ran:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/[ull_stream_target_id]/metrics/historic"
  • Get a snapshot of connection and processing metrics for an active ultra low latency stream target:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/[ull_stream_target_id]/metrics/current"

For more information about ultra low latency stream metrics, see View ultra low latency stream health metrics with the Wowza Streaming Cloud REST API.

Query for usage


Usage data shows the amount of bandwidth used and billed by a target. Use the following example request to view usage data for all stream targets in the account, not just ultra low latency targets.

  • Get network usage (bandwidth) used and billed for all stream targets:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/usage/network/stream_targets/"

For more information about network usage for ultra low latency streams, see View ultra low latency usage with the Wowza Streaming Cloud REST API.

Query for viewer data


Viewer data includes the locations where the ultra low latency stream was requested and how many requests were made to the edge server.

  • Get viewer data for an ultra low latency stream target for the current billing period:

    curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/usage/viewer_data/stream_targets/[ull_stream_target_id]"

For more information about ultra low latency viewer data, see Get ultra low latency viewer data with the Wowza Streaming Cloud REST API.

Update the target


Use the following example request to update the name of the ultra low latency target. You don't have to stop the stream to update its configuration.

  • Update an ultra low latency stream target's configuration:

    Note: The enable_hls and source_delivery_method parameters can't be updated.

    curl -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" -H "Content-Type: application/json" -X POST -d '{
    	"ull_stream_target": {
    		"name": "My Awesome Ultra Low Latency Stream Target",
    	}
    }' "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

Delete the target


When you are done viewing information about a ultra low latency stream target, you can delete it.

  • Delete an ultra low latency stream target:

    curl -X DELETE -H "wsc-api-key: [key]" -H " wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

More resources