Skip to main content

Active Traffic Report

It shows active data based on the hit, traffic, and bandwidth per minute. The interval field is must be between 1 and 20.

Parameters

Parameter

Type

Required

Description

user_key

string

Yes

API User Token

user_secret

string

Yes

API User Secret Token

timezone

string

No

Country Timezone.

interval

string

Yes

It must be between 1 and 20.

type

string

No

stream or progressive. Default null

zone_ids

array

No

Int value. It can be multiple.

histogram

string

No

Takes values ​​like 1m, 2m, 5m (m stands for minute)

Return Values

Variable

Description

hit

int

traffic

float - in mb type.

bandwidth

float - per minute in mb type.

Example PHP Code

CODE
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.medianova.com/v1/report/active-traffic?",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example Output

CODE
{
  "status": true,
  "data": {
    "2017-03-14 16:48:00": {
      "traffic": 2228.7867,
      "hit": 90231,
      "bandwidth": 297.1716
    },
    "2017-03-14 16:49:00": {
      "traffic": 2027.1564,
      "hit": 79394,
      "bandwidth": 270.2875
    },
    "2017-03-14 16:50:00": {
      "traffic": 2207.6945,
      "hit": 86547,
      "bandwidth": 294.3593
    },
    "2017-03-14 16:51:00": {
      "traffic": 2195.3814,
      "hit": 89123,
      "bandwidth": 292.7175
    },
    "2017-03-14 16:52:00": {
      "traffic": 2384.1913,
      "hit": 93758,
      "bandwidth": 317.8922
    },
    "2017-03-14 16:53:00": {
      "traffic": 2647.0926,
      "hit": 99836,
      "bandwidth": 352.9457
    },
    "2017-03-14 16:54:00": {
      "traffic": 3059.194,
      "hit": 109478,
      "bandwidth": 407.8925
    },
    "2017-03-14 16:55:00": {
      "traffic": 2830.727,
      "hit": 105636,
      "bandwidth": 377.4303
    },
    "2017-03-14 16:56:00": {
      "traffic": 2835.0082,
      "hit": 100663,
      "bandwidth": 378.0011
    },
    "2017-03-14 16:57:00": {
      "traffic": 2559.3555,
      "hit": 99793,
      "bandwidth": 341.2474
    }
  }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.