Skip to main content

Traffic Usage by Protocol Types

This operation shows the traffic usage by protocol type.

Parameters

Parameter

Type

Required

Description

user_key

string

Yes

API User Token

user_secret

string

Yes

API User Secret Token

from

string

Yes

Y-m-d date format.

to

string

Yes

Y-m-d date format.

type

string

No

stream or progressive. Default null

zone_ids

array

No

Int value(s).

Return Values

Variable

Type

protocol

string

hit

integer

traffic

float

bandwidth

float

timezone

string

Example PHP Code

CODE
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.medianova.com/v1/report/protocol",
  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":[
      {
         "protocol":"http",
         "hit":134536038,
         "traffic":9766708919253,
         "bandwidth":113040612,
         "timezone":"GMT+3"
      },
      {
         "protocol":"https",
         "hit":6581977,
         "traffic":70324124956,
         "bandwidth":813937,
         "timezone":"GMT+3"
      }
   ]
}

JavaScript errors detected

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

If this problem persists, please contact our support.