Examples

A guide for developers to access a FMADIO using the web based API. Examples are provided for all endpoints.

FMADIO API

The examples show how to use the different parameters for the uri endpoint.

Note: Replace the IP 127.0.0.1 with the host IP of your FMADIO device.

Status

curl -u fmadio:100g "http://127.0.0.1/sysmaster/status"

Device Status

curl -u fmadio:100g "http://127.0.0.1/sysmaster/stats_summary"

CaptureList

curl -u fmadio:100g "http://127.0.0.1/stream/list"

Capture Split By Filesize

curl -u fmadio:100g "http://127.0.0.1/stream/ssize?
    StreamName=stream_test_001&
    StreamView=split_1GB&"

Capture Split By Time

Legacy Interface

Single

StreamName only:

StreamName and FilterBPF

StreamName and Compression

StreamName and FilterRE

StreamName, Compression and FilterBPF

SplitTime

StreamName, Start and Stop

StreamName, Start, Stop and FilterBPF

StreamName, Start, Stop and FilterPort

TimeRange

TSBegin and TSEnd

TSBegin, TSEnd, TSMode and TSMax

V1 API

The examples show how to use the different parameters for the uri endpoint.

Note: Replace the IP 127.0.0.1 with the host IP of your FMADIO device.

API v1 - Single

StreamName only.

StreamName and FilterBPF

StreamName and Compression

StreamName, Compression and FilterBPF

API v1 - SplitTime

StreamName, Start and Stop

StreamName, Start, Stop and FilterBPF

StreamName, Start, Stop, FilterBPF and Compression

StreamName, Start, Stop and Compression

API v1 - TimeRange

The Time Range function is very useful as the FMADIO system will work out which (or multiple) captures to check based on the Epoch Time stamp value.

TSBegin and TSEnd

Nanosecond Epoch selection

Second Epoch time Selection

Year Month Day Hour Min

Using the TSUnit option can use a more friendly time selection.

By default it uses the TimeZone configured on the system

Fetch PCAP from 3AM to 4AM on 2023 / 10 (October) / 1st

Year Month Dat Hour Min with Timezone

Same as above but specifying the timezone.

NOTE: if using the full TSZone = Asia/Singapore for example, CURL will append a ? to the URL. Its recommended to use the City name only to avoid confusing CURL.

Year Month Day Hour Min Timzone and BPF Filter with De-encapsulation

Specifying all of the above with a BPF Filter, with BPF De-encapsulation enabled

TSBegin, TSEnd and TSMax

TSBegin, TSEnd and FilterBPF

TSBegin, TSEnd and Compression

TSBegin, TSEnd, FilterBPF and Compression

TSBegin, TSEnd, FilterBPF and FilterFrame

Frame Filters based on FMADIO Capture system

Filter based on FMADIO Capture port number

Filter based on multiple FMADIO Capture port numbers

Filter based on exclude FMADIO Capture port numbers

Filter for a specific 7130 Device 54932 (any port)

Filter for everything except a specific 7130 Device (not device id 54932)

Filter for a specific 7130 Port number 1

Filter for multiple 7130 Port numbers 1, 2, 3, 5, 10

Filter for everything except 7130 Port number 10

Filter on a specific 7130 Port number and use the 7130 Footer Timestamp as the PCAP timestamp. Overriding the current TimeStamp setting

Filter on a specific ingress port of the Cisco 3550, and use the Footer timestamp as the PCAP timestamp.

Miscellaneous Examples

Encapsulation Debug

Many times the exact packet encapsulation is unclear, the following uses a wireshark filter expression to extract and show the full encapsulation format of the packet. From this a high speed BPF filter can be used to process the data.

In the below example we are using the Wireshark filter "ip.addr == 192.168.1.1" on a historical capture.

Alternatively running on the currently running capture via SSH on the fmadio box looks like the following. This example filters on any UDP traffic.

The output looks like the following

The above output shows there is a single VLAN tag in the packet. Making the equivalent BPF filter

With the final BPF filter using a CURL request

Output per below

Last updated

Was this helpful?