Skip to main content
In this guide, you will learn how to retrieve recorded audio from a Rhombus A100 Audio Gateway using the Rhombus API. You will:
  1. Call the API to get media URI templates
  2. Generate a federated session token for WAN playback
  3. Download the DASH MPD and audio segments
  4. Optionally convert the resulting Opus/WebM audio using ffmpeg
Rhombus exposes media access through URI templates rather than returning raw audio bytes directly from a single REST response.

Prerequisites

All API calls in this guide use the following authentication headers:
Base URL: https://api2.rhombussystems.com
You will need:
  • An A100 Audio Gateway UUID (Rhombus DeviceFacetUuid / RUUID style string)
  • Recorded audio that exists and is available (determined by your device licensing and recording configuration)
  • A client capable of:
    • Making HTTP requests
    • Parsing XML (for the MPD manifest)
    • Writing binary segment bytes to disk

Implementation Steps

1

Get the A100 Audio Gateway Media URIs

Call the getMediaUris endpoint to retrieve the URI templates for your audio gateway.Endpoint: POST /api/audiogateway/getMediaUris
Relevant response fields:
2

Generate a Federated Session Token

WAN MPD access requires a short-lived federated session token appended as query parameters.Endpoint: POST /api/org/generateFederatedSessionToken
Response: Returns federatedSessionToken
Choose a durationSec long enough to fetch the MPD and all segments for your requested range. For large pulls (up to 24 hours), increase this value accordingly.
3

Build the WAN VOD MPD URL

Take the wanVodMpdUriTemplate from Step 1 and perform string substitution:
  • Replace {START_TIME} with your requested start time (in seconds)
  • Replace {DURATION} with your requested duration (in seconds)
Timestamp units matter!Rhombus audio endpoints use seconds since epoch (startTimeSec, durationSec). If your timestamps are stored in milliseconds, convert them:
4

Fetch the MPD with the Federated Token

Append the authentication query parameters to your MPD URL:
This MPD is a DASH manifest that describes how to fetch the init segment and subsequent audio segments.
5

Download and Stitch Segments

Download the segments in order, appending the same ?x-auth-scheme=federated-token&x-auth-ft=<TOKEN> query parameters you used for the MPD — the segments are served from the same WAN host and use the same authentication:
  1. Init segment (e.g., seg_init_audio.hdr)
  2. Media segments (e.g., seg_1.webm, seg_2.webm, …)
Segments are 2 seconds each. Calculate the number of segments:
Write the init header bytes followed by each segment’s bytes to produce a valid WebM/Opus audio file (48 kHz, mono).

Complete Python Example

This example implements the full workflow described above:

Converting Audio with ffmpeg

The downloaded audio is in Opus/WebM format (48 kHz, mono). You can convert it to other formats using ffmpeg:

Troubleshooting

Cause: Template substitution uses wrong time units.Solution: If your timestamps are in milliseconds but the template expects seconds, convert them:
Cause: The code assumes the MPD filename is file.mpd.Solution: If your template uses a different filename, adjust the string replacement logic:
Cause: The federated token duration is too short for large audio pulls.Solution: Increase durationSec when generating the token. For 24-hour pulls, you may need significantly longer durations to fetch all segments.

API Reference

The following endpoints are used in this guide. Visit the API Reference tab for full request and response schemas.
  • POST /api/audiogateway/getMediaUris — Get Media URIs for Audio Gateway
  • POST /api/org/generateFederatedSessionToken — Generate Federated Session Token
Last modified on July 8, 2026