CDN加速

文档中心 WEB应用防火墙 API文档 查询WAF域名计费信息

查询WAF域名计费信息

更新时间:2021-10-11 18:45:46

适用产品:WAF、Application Shield

接口描述

CDNW的WAF计费需要用到WAF域名使用记录信息用于确认域名带宽的计算逻辑,CDNW的接口调用无法通过内部XDR同步,因此需要封装一个W+接口给CDNW调用。

请求参数

BEGINTIME
CHANNEL
CUSTOMERCODE
ENDTIME
SERVICETYPE
参数名称类型必填描述
beginTimeString开始时间,格式为yyyy-mm-dd hh:mm:ss

示例

调用示例
示例说明
请求示例
复制
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`

curl -i --url " https://open.chinanetcenter.com/waf/api/secDomainBillingCDNW" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d ' {
"beginTime":"2019-02-11 16:09:00",
"endTime":"2019-02-11 16:10:00",
"customer":"customer",
} '
返回示例
复制
{

    "code": 200,

    "data": [

        {

            "serviceType": "1",

            "enddate": "-",

            "domain": "www.test.com",

            "id": 1,

            "startdate": "2018-12-19 10:48:45"
        },

        {

            "serviceType": "1",

            "enddate": "-",

            "domain": ".xujw3.com",

            "id": 2,

            "startdate": "2018-12-21 11:03:29"

        }

    ]

}