Working with reports
The Alef Reporting API is designed to give a similar experience as the mainstream metrics APIs. It uses a syntax that is similar to Prometheus and is broadly used in the industry. We will continue to expand the metrics and reports that can be retrieved via this API.
All APIs require the user to be authenticated with their username/password.
The JWT token needs to be added to the header as Bearer
of each call.
When creating a report you will:
- Define the time window.
- Specify the
step
value, which is the time interval between data points. - Define your filters with the
dimensions
object, and thedimension_filter_clauses
object which will contain thefilter
objects. - Request metrics such as connections, time usage, and data usage with the
metrics
object. - Use
aggregation_type
to choose which data within the raw report data you want to see.
Authentication
All Reporting APIs use a JWT bearer token for authorization. Follow the instructions in the API Guide
Time windows
Some of the reports below require you to specify the time window over which to run the report.
The time window is set with start_date_time
and end_date_time
. You can either specify actual times and dates, in the format YYYY-MM-DDTHH:mm:ss
, or request a set time block with LAST MINUTE
, LAST HOUR
, LAST DAY
, LAST WEEK
, LAST MONTH
or NOW
(returns the last 5 minutes).
If you are requesting a set time block, this must be configured in both start_date_time
and end_date_time
, for example:
"start_date_time": "LAST HOUR",
"end_date_time": "NOW",
Step values
You can specify the data point frequency in your report with the step
parameter. For example: 5h, 1h30m, 5m, or 10s. Make sure the step value is within your time window to get a valid value returned.
Valid time values are:
- s - seconds
- m - minutes
- h - hours
- d - days - assuming a day always has 24h
- w - weeks - assuming a week always has 7d
- y - years - assuming a year always has 365d
Time durations can be combined by concatenation. Units must be ordered from the longest to the shortest. A given unit must only appear once in a time duration.
Dimensions and metrics
As mentioned above, you will request a report metric
, and filter it with dimensions
. All requests must include a device
in the dimension_filters
array to filter by. This device will be either DEN-1
, CHI-1
, or PHI-1
, depending on a customer's specific deployment location. Our reports are grouped into mobile device or 'UE' reports, Access Point reports, and Edge Point reports. Refer to the Mobile Device (UE) Reports, Access Point (AP) Reports, and Edge Point Reports sections for more details.
Aggregation types
A report will gather many data points, and you decide which specific data you are interested in by defining the aggregation_type
. This may be a single data point, such as MAX
or MIN
, or a calculation derived from multiple data points, such as AVG
.
Supported aggregation types are:
EXISTS
(for status reports)COUNT
(sum of data points)MAX
MIN
AVG
Different metrics
support different aggregation_types
:
ue_online_status
, ue_count
, ap_count
:
COUNT
EXISTS
ue_status
, ap_status
:
COUNT
EXISTS
AVG
ue_connections
:
COUNT
MAX
AVG
All other metrics:
COUNT
MAX
MIN
AVG
## Example Scripts Example scripts utilizing the Reporting API can be found in the Alef Public Repo. Please note that these scripts are intended to showcase potential use cases for our API and are not intended for production environments.