Real-Time Metrics

Edit on GitHub

Real-time Metrics API enables you to consult monitoring data taken from the traffic generated by your content and applications through Azion.

The data is grouped by Product, Domain, Metrics and Dimension.

  1. Retrieving the list of domains by product
  2. Retrieving the aggregate data for a metric by domain
  3. Retrieving the aggregate data for a specific dimension of a metric

1. Retrieving the list of domains by product

It returns the list of all domains related to the selected product.

GET /metrics/products/:prod_id/configurations

Permission necessary: Analytics

Parameter Description Type of Parameter Type of Data
Authorization
*mandatory
Authentication through the Token, previously created through the endpoint of Token Creation

For example:

Authorization:
583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf
header string
:prod_id
*mandatory
Product ID to be consulted:

Edge Applications = 1441740010
Data Streaming = 1498670028
Edge Functions = 1531930033
Image Processor = 1441110021
Intelligent DNS = 1563390045
L2 Caching = 1564082375
Live Streaming = 1441740004
Load Balancer = 1441740012
path number

Example Request

GET  /api.azion.net/api/metrics/products/1441740010/configurations
Accept: application/json; version=2
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Example Response

HTTP/2 200
{  
     “id”:  1571935365,
     “name”:  “edgeapplication1”,
     “active”:  true,
     “domains”:  [
             1571944666,
             1573685184,
             1573735195,
             1573735196,
             1573755201,
             1573755203,
             1574345332,
             1574345333,
             1609959772
       ]
  },
  {
     “id”:  1575396468,
     “name”:  “edgeapplication2”,
     “active”:  true,
     “domains”:  [
             1575395594
  ]
  


2. Retrieving the aggregate data for a metric by domain

It returns the aggregate data of a metric by domain related to the selected product.

GET /metrics/products/:prod_id/configurations/:conf_id/metrics/:metric_name

Permission necessary: Analytics

Parameter Description Type of Parameter Type of Data
Authorization
*mandatory
Authentication through the Token, previously created through the endpoint of Token Creation

For example:

Authorization:
583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf
header string
:prod_id
*mandatory
Product ID to be consulted:

Edge Applications = 1441740010
Data Streaming = 1498670028
Edge Functions = 1531930033
Image Processor = 1441110021
Intelligent DNS = 1563390045
L2 Caching = 1564082375
Live Streaming = 1441740004
Load Balancer = 1441740012
path Number
:conf_id
*mandatory
Domain ID to be consulted
To get the ID of a configuration, refer to Looking up the list of domains by product.
path number
:metric_name
*mandatory
Metric name to be consulted

Data Streaming
data_streaming_data_streamed
data_streaming_requests

Edge Applications
data_transferred_total
data_offloaded
cdn_requests
requests_per_second
requests_offloaded
status_code
http_method
waf
bandwidth

Live Streaming
live_streaming_data_transferred

Edge Functions
invocations

Intelligent DNS
idns_queries
hosted_zones

Image Processor
images_processed

L2 Caching
l2_data_transferred

Load Balancer
load_balancer_data_transferred
pathpath string
date_from
*mandatory
Date and time of the start of the query in the format “YYYY-MM-DDThh:mm” (Local Time) or “YYYY-MM-DDThh:mmZ” (UTC). You can also specify a duration by using one of the following values, and in this case the date_to parameter is left out.

last-hour
last-3-days
last-3-hours
last-7-days
last-6-hours
last-15-days
last-24-hours
last-30-days
query string
date_to
*opcional
Date and time of the end of the query in the format “YYYY-MM-DDThh:mm” (Local Time) or “YYYY-MM-DDThh:mmZ” (UTC). You can also specify a duration by using the value “now”, and in the case of omission it will be considered the default value. query string

Example Request

GET  /api.azion.net/api/metrics/products/1441740010/configurations/1573735195/metrics/data_transferred?date_from=2021-02-03...
Accept: application/json; version=2
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Example Response

HTTP/2 200
             1612313100000.0,
              0.001946
  ],
  [
             1612314000000.0,
              0.001678
  ],
  [
             1612313700000.0,
              0.002853
  ],
  [
             1612314000000.0,
              0.003564
  ],
  [
       

3. Retrieving the aggregate data for a specific dimension of a metric

It returns the aggregate data for a specific dimension of a metric related to the selected product.

GET /metrics/products/:prod_id/configurations/:conf_id/metrics/:metric_name/dimensions/:dim_name

Permission necessary: Analytics

Parameter Description Type of Parameter Type of Data
Authorization
*mandatory
Authentication through the Token, previously created through the endpoint of Token Creation

For example:

Authorization:
583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf
header string
:prod_id
*mandatory
Product ID to be consulted:

Edge Applications = 1441740010
Data Streaming = 1498670028
Edge Functions = 1531930033
Image Processor = 1441110021
Intelligent DNS = 1563390045
L2 Caching = 1564082375
Live Streaming = 1441740004
Load Balancer = 1441740012
path Number
:conf_id
*mandatory
Domain ID to be consulted
To get the ID of a configuration, refer to Looking up the list of domains by product.
path number
:metric_name
*mandatory
Metric name to be consulted

Data Streaming
data_streaming_data_streamed
data_streaming_requests

Edge Applications
data_transferred_total
data_offloaded
cdn_requests
requests_per_second
requests_offloaded
status_code
http_method
waf
bandwidth

Live Streaming
live_streaming_data_transferred

Edge Functions
invocations

Intelligent DNS
idns_queries
hosted_zones

Image Processor
images_processed

L2 Caching
l2_data_transferred

Load Balancer
load_balancer_data_transferred

pathpath string
:dim_name
*mandatory
Dimension name of the metric to be consulted.    
date_from
*mandatory
Date and time of the start of the query in the format “YYYY-MM-DDThh:mm” (Local Time) or “YYYY-MM-DDThh:mmZ” (UTC). You can also specify a duration by using one of the following values, and in this case the date_to parameter is left out.

last-hour
last-3-days
last-3-hours
last-7-days
last-6-hours
last-15-days
last-24-hours
last-30-days
query string
date_to
*opcional
Date and time of the end of the query in the format “YYYY-MM-DDThh:mm” (Local Time) or “YYYY-MM-DDThh:mmZ” (UTC). You can also specify a duration by using the value “now”, and in the case of omission it will be considered the default value. query string

Example Request

GET        /api.azion.net/api/metrics/products/1441740010/configurations/1573735195/metrics/data_transferred/dimensions/total?date_from=2021-02-03 00:00&date_to=2021-02-03 05:00
Accept: application/json; version=2
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Example Response

HTTP/2 200
],
  [
     161231400000.0
     0.0014359999999999995

  ],
  […
  ],
  […
  ],
  [
     161231400000.0
     0.0000289999999999995

  ],
  […
  ],
  [
     161231400000.0
     0.0046559999999999995
  ],
             

Didn’t find what you were looking for? Open a ticket.