本文为您提供了服务端 PHP SDK 的数据统计模块的接口调用示例。
接口请求参数和返回参数详见 OpenAPI:查询带宽用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodDescribeVodDomainBandwidthDataRequest(); $request->setDomainList("your DomainList"); $request->setDomainInSpaceList("your DomainInSpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setAggregation(0); $request->setBandwidthType("your BandwidthType"); $request->setArea("your Area"); $request->setRegionList("your RegionList"); $response = new Volc\Service\Vod\Models\Response\VodDescribeVodDomainBandwidthDataResponse(); try { $response = $client->describeVodDomainBandwidthData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询流量用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodDescribeVodDomainTrafficDataRequest(); $request->setDomainList("your DomainList"); $request->setDomainInSpaceList("your DomainInSpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setAggregation(0); $request->setTrafficType("your TrafficType"); $request->setArea("your Area"); $request->setRegionList("your RegionList"); $response = new Volc\Service\Vod\Models\Response\VodDescribeVodDomainTrafficDataResponse(); try { $response = $client->describeVodDomainTrafficData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询存储用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodDescribeVodSpaceStorageDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setAggregation(0); $request->setType("your Type"); $request->setRegionList("your RegionList"); $response = new Volc\Service\Vod\Models\Response\VodDescribeVodSpaceStorageDataResponse(); try { $response = $client->describeVodSpaceStorageData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询转码用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceTranscodeDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setTranscodeType("your TranscodeType"); $request->setSpecification("your Specification"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $request->setRegionList("your RegionList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceTranscodeDataResponse(); try { $response = $client->describeVodSpaceTranscodeData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询截图用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSnapshotDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setSnapshotType("your SnapshotType"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $request->setRegionList("your RegionList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSnapshotDataResponse(); try { $response = $client->describeVodSnapshotData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询画质增强用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodEnhanceImageDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setTaskTypeList("your TaskTypeList"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $response = new Volc\Service\Vod\Models\Response\DescribeVodEnhanceImageDataResponse(); try { $response = $client->describeVodEnhanceImageData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询检测修复用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceDetectStatisDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setDetectType("your DetectType"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceDetectStatisDataResponse(); try { $response = $client->describeVodSpaceDetectStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询多媒体 AI 用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceAIStatisDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setMediaAiType("your MediaAiType"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceAIStatisDataResponse(); try { $response = $client->describeVodSpaceAIStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询智能字幕用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceSubtitleStatisDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setSubtitleType("your SubtitleType"); $request->setTaskStageList("your TaskStageList"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceSubtitleStatisDataResponse(); try { $response = $client->describeVodSpaceSubtitleStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询视频剪辑用量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceEditStatisDataRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setSpecification("your Specification"); $request->setAggregation(0); $request->setDetailFieldList("your DetailFieldList"); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceEditStatisDataResponse(); try { $response = $client->describeVodSpaceEditStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询转码详细数据。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceWorkflowDetailDataRequest(); $request->setRegion("your Region"); $request->setSpace("your Space"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setPageSize(0); $request->setPageNum(0); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceWorkflowDetailDataResponse(); try { $response = $client->describeVodSpaceWorkflowDetailData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询视频剪辑详细数据。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodSpaceEditDetailDataRequest(); $request->setRegion("your Region"); $request->setSpace("your Space"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setPageSize(0); $request->setPageNum(0); $response = new Volc\Service\Vod\Models\Response\DescribeVodSpaceEditDetailDataResponse(); try { $response = $client->describeVodSpaceEditDetailData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:获取带宽流量。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodListCdnUsageDataRequest(); $request->setDomains("your Domains"); $request->setInterval("your Interval"); $request->setStartTimestamp(0); $request->setEndTimestamp(0); $request->setDataType("your DataType"); $request->setMetric("your Metric"); $request->setNeedDetail(false); $request->setArea("your Area"); $request->setRegion("your Region"); $request->setIsp("your Isp"); $request->setProtocol("your Protocol"); $request->setIpVersion("your IpVersion"); $request->setBillingRegion("your BillingRegion"); $response = new Volc\Service\Vod\Models\Response\VodCdnStatisticsCommonResponse(); try { $response = $client->listCdnUsageData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:获取请求数。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodListCdnPvDataRequest(); $request->setDomains("your Domains"); $request->setInterval("your Interval"); $request->setStartTimestamp(0); $request->setEndTimestamp(0); $request->setDataType("your DataType"); $response = new Volc\Service\Vod\Models\Response\VodCdnStatisticsCommonResponse(); try { $response = $client->listCdnPvData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:获取状态码。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodListCdnStatusDataRequest(); $request->setDomains("your Domains"); $request->setInterval("your Interval"); $request->setStartTimestamp(0); $request->setEndTimestamp(0); $request->setDataType("your DataType"); $request->setMetric("your Metric"); $response = new Volc\Service\Vod\Models\Response\VodCdnStatisticsCommonResponse(); try { $response = $client->listCdnStatusData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:获取热点 URL 统计。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodListCdnTopAccessUrlRequest(); $request->setDomains("your Domains"); $request->setStartTimestamp(0); $request->setEndTimestamp(0); $request->setSortType("your SortType"); $response = new Volc\Service\Vod\Models\Response\VodListCdnTopAccessUrlResponse(); try { $response = $client->listCdnTopAccessUrl($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:获取热点统计数据。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\VodListCdnTopAccessRequest(); $request->setDomains("your Domains"); $request->setStartTimestamp(0); $request->setEndTimestamp(0); $request->setSortType("your SortType"); $request->setItem("your Item"); $response = new Volc\Service\Vod\Models\Response\VodListCdnTopAccessResponse(); try { $response = $client->listCdnTopAccess($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询视频播放信息。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodPlayedStatisDataRequest(); $request->setSpace("your Space"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setVidList("your VidList"); $request->setOrderType("your OrderType"); $response = new Volc\Service\Vod\Models\Response\DescribeVodPlayedStatisDataResponse(); try { $response = $client->describeVodPlayedStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数详见 OpenAPI:查询播放 TopN 的视频。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodMostPlayedStatisDataRequest(); $request->setSpace("your Space"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $request->setOrderType("your OrderType"); $request->setTopN(0); $response = new Volc\Service\Vod\Models\Response\DescribeVodMostPlayedStatisDataResponse(); try { $response = $client->describeVodMostPlayedStatisData($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }
接口请求参数和返回参数说明详见 DescribeVodVidTrafficFileLog。
<?php require('../../vendor/autoload.php'); // Create a VOD instance in the specified region. // $client = Volc\Service\Vod\Vod::getInstance('cn-north-1'); $client = Volc\Service\Vod\Vod::getInstance(); // Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see https://www.volcengine.com/docs/4/4408. // The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed. // During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account. // $client->setAccessKey('your ak'); // $client->setSecretKey('your sk'); $request = new Volc\Service\Vod\Models\Request\DescribeVodVidTrafficFileLogRequest(); $request->setSpaceList("your SpaceList"); $request->setStartTime("your StartTime"); $request->setEndTime("your EndTime"); $response = new Volc\Service\Vod\Models\Response\DescribeVodVidTrafficFileLogResponse(); try { $response = $client->describeVodVidTrafficFileLog($request); } catch (Exception $e) { echo $e, "\n"; } catch (Throwable $e) { echo $e, "\n"; } if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) { echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n"; } else { echo $response->serializeToJsonString(), "\n"; }