You need to enable JavaScript to run this app.
导航
下行网络监控
最近更新时间:2024.12.05 18:30:54首次发布时间:2024.12.05 18:30:54

阅读本文,您可以获取 PHP SDK 下行网络监控的接口调用示例,实现快速开发。

说明

本文的调用示例包含接口的部分参数。由于参数间可能存在互斥关系,在调用时,请您参考注释,进行调整。

调用说明

  • 本文提供的接口调用示例均通过 AK 和 SK 初始化实例。
  • 接口的参数说明和错误码等信息可通过接口文档查看。

前提条件

调用接口前,请先完成 PHP SDK 的安装及初始化操作。

调用示例

本节为您介绍下行网络监控相关接口的功能和调用示例。

查询网络成功率时序数据

您可以调用 DescribeImageXCdnSuccessRateByTime 接口查询网络成功率时序数据。详细的参数说明可参见 DescribeImageXCdnSuccessRateByTime 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnSuccessRateByTime($body);
print_r($response);

查询网络成功率分布

您可以调用 DescribeImageXCdnSuccessRateAll 接口查询网络成功率分布。详细的参数说明可参见 DescribeImageXCdnSuccessRateAll 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnSuccessRateAll($body);
print_r($response);

查询错误码时序数据

您可以调用 DescribeImageXCdnErrorCodeByTime 接口查询错误码时序数据。详细的参数说明可参见 DescribeImageXCdnErrorCodeByTime 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnErrorCodeByTime($body);
print_r($response);

查询错误码分布

您可以调用 DescribeImageXCdnErrorCodeAll 接口查询错误码分布。详细的参数说明可参见 DescribeImageXCdnErrorCodeAll 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnErrorCodeAll($body);
print_r($response);

查询网络耗时时序数据

您可以调用 DescribeImageXCdnDurationDetailByTime 接口查询网络耗时时序数据。详细的参数说明可参见 DescribeImageXCdnDurationDetailByTime 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnDurationDetailByTime($body);
print_r($response);

查询网络耗时分布

您可以调用 DescribeImageXCdnDurationAll 接口查询网络耗时分布。详细的参数说明可参见 DescribeImageXCdnDurationAll 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnDurationAll($body);
print_r($response);

查询网络连接复用率时序数据

您可以调用 DescribeImageXCdnReuseRateByTime 接口查询网络连接复用率时序数据。详细的参数说明可参见 DescribeImageXCdnReuseRateByTime 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnReuseRateByTime($body);
print_r($response);

查询网络连接复用率分布

您可以调用 DescribeImageXCdnReuseRateAll 接口查询网络连接复用率分布。详细的参数说明可参见 DescribeImageXCdnReuseRateAll 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnReuseRateAll($body);
print_r($response);

查询网络协议占比

您可以调用 DescribeImageXCdnProtocolRateByTime 接口查询网络协议占比。详细的参数说明可参见 DescribeImageXCdnProtocolRateByTime 接口文档。

接口调用示例如下所示。

<?php
include_once(__DIR__ . '/../../../../vendor/autoload.php');

use Volc\Service\ImageX\V2\Imagex;

$client = Imagex::getInstance();

// call below method if you dont set ak and sk in ~/.volc/config
$client->setAccessKey("ak");
$client->setSecretKey("sk");

$body = [];

$response = $client->describeImageXCdnProtocolRateByTime($body);
print_r($response);