Skip to content
Daniel Ramsay edited this page Mar 19, 2023 · 3 revisions

API Endpoints - stats

GET /1.2/status/stats

Returns some headline statistics from the API database

GET Parameters:

Field Example Payload
email API user's email account
date Date of request (YYYY-MM-DD HH24:MI:SS)
signature User Private Key

hex_hmac(date, $secret)

Returns some headline statistics from the API database

blocked_sites_detected_default_filter was added 20140704, to provide a count of unique sites (URLs) that were blocked on networks set to their default filter strength. blocked_sites_detected provides a count of blocked URLs across all networks at all strengths.

Response

{
 "success": true,
 "stats": {
   "urls_reported": 9999,
   "urls_tested": 999,
   "blocked_sites_detected": 99,
   "blocked_sites_detected_default_filter": 79
  }
}

}

GET /1.2/status/isp-stats

Returns URL status totals broken down by ISP/Filter level

GET Parameters:

Field Example Payload
email API user's email account
date Date of request (YYYY-MM-DD HH24:MI:SS)
signature User Private Key

hex_hmac(date, $secret)

Useful for showing a league table of ISP blocking.

Response

{
 "success": true,
 "isps": {
   "ISP1": {"ok":99,"blocked":10,"error":15,"timeout":0,"total":124},
   "ISP2": {"ok":79,"blocked":10,"error":15,"timeout":0,"total":104}
 }
}

GET /1.2/status/daily-stats

Retrieves time-series statistics, updated daily

GET parameters

Field Example Payload
email API user's email account
date Date of request (YYYY-MM-DD HH24:MI:SS)
days (optional) number of days data to return, ending with the current date. Default is 84 days.
signature User Private Key

hex_hmac(date, $secret)

Response

A series of dates with a stats stanza corresponding to each day.

blocked: the number of blocked sites from the reference set (the alexa 100k, as with /status/stats)

More entries to be added as required.

{
  "success":true,
  "stats":{
    "2015-06-02":{"blocked":36},
    "2015-06-03":{"blocked":31},
    "2015-06-04":{"blocked":29},
    "2015-06-05":{"blocked":34}
  }
}