1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

site

doc

blog

success stories

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

Required permission: Analytics

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

For example:

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

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

Request Example

GET  /metrics/products/1441740010/configurations
Accept: application/json; version=3
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Response Example

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

Required permission: Analytics

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

Example:

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

Edge Applications = 1441740010
Data Streaming = 1498670028
Edge Functions = 1531930033
Image Processor = 1441110021
Intelligent DNS = 1563390045
L2 Caching = 1564082375
Load Balancer = 1441740012
path Number
:conf_id
*required
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
*required
Metric name to be consulted

Data Streaming
data_streaming_data_streamed
data_streaming_requests

Edge Applications
data_transferred
data_offloaded
cdn_requests
requests_per_second
requests_offloaded
status_code
http_method
waf
connected_users
bandwidth

Edge Functions
invocations

Intelligent DNS
idns_queries
hosted_zones

Image Processor
images_processed

L2 Caching
l2_data_transferred

Load Balancer
load_balancer_data_transferred
path string
date_from
*required
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
*optional
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
human_readable
*optional
In order to make the timestamp presented by the API easier to understand for human users, the parameter called “human_readable” was added. By default, this parameter is set as “false”, but by entering it as “true”, the user will get the timestamp in the following format: YYYY-MM-DD hh:mm

Example: 2021-05-19 16:14

Note: This parameter is not case sensitive, so it can get any variation of true, for example: True, TRUE, TrUe.
query boolean

Request Example

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

Response Example

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

Required permission: Analytics

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

Example:

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

Edge Applications = 1441740010
Data Streaming = 1498670028
Edge Functions = 1531930033
Image Processor = 1441110021
Intelligent DNS = 1563390045
L2 Caching = 1564082375
Load Balancer = 1441740012
path Number
:conf_id
*required
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
*required
Metric name to be consulted

Data Streaming
data_streaming_data_streamed
data_streaming_requests

Edge Applications
data_transferred
data_offloaded
cdn_requests
requests_per_second
requests_offloaded
status_code
http_method
waf
connected_users
bandwidth

Edge Functions
invocations

Intelligent DNS
idns_queries
hosted_zones

Image Processor
images_processed

L2 Caching
l2_data_transferred

Load Balancer
load_balancer_data_transferred

path string
:dim_name
*required
Dimension name of the metric to be consulted.    
date_from
*required
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
*optional
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
human_readable
*optional
In order to make the timestamp presented by the API easier to understand for human users, the parameter called “human_readable” was added. By default, this parameter is set as “false”, but by entering it as “true”, the user will get the timestamp in the following format: YYYY-MM-DD hh:mm

Example: 2021-05-19 16:14

Note: This parameter is not case sensitive, so it can get any variation of true, for example: True, TRUE, TrUe.
query boolean

Request Example

GET        /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=3
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Response Example

HTTP/2 200
],
  [
     161231400000.0
     0.0014359999999999995

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

  ],
  […
  ],
  [
     161231400000.0
     0.0046559999999999995
  ],
             

Request example for human_readable parameter

GET /metrics/products/1441740010/configurations/1573735195/metrics/data_transferred/dimensions/total?date_from=2021-05-19 17:35&date_to=2021-05-19 17:40&human_readable=true
Accept: application/json; version=3
Authorization: Token 583f8a9ca8d6d5ff2cb50f1d3c4d35cb8939f1bf

Response example for human_readable parameter

HTTP/2 200
],
  [
     "2021-05-19 17:36"
     0.0014359999999999995

  ],
  […
  ],
  […
  ],
  [
     "2021-05-19 17:37"
     0.0000289999999999995

  ],
  […
  ],
  [
     "2021-05-19 17:38"
     0.0046559999999999995
  ],

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