开发者社区> 问答> 正文

如何获取PCDN的API接口历史计费数据



描述


获取计费数据历史记录

请求参数

名称类型是否必须描述
ActionString系统参数,取值:GetFeeHistory
Pageint当前页码
PageSizeint每页的记录条数


返回参数

名称类型描述
PagerStruct计费方式,0表示日峰值带宽,95表示月95峰值带宽
FeeListFee[]返回的计费信息列表

数据类型Pager
名称类型描述
PageSizeint每页的记录条数
Pageint当前页码
Totalint总记录的条数

数据类型UsageData
名称类型描述
EndDateString计费周期结束时间
StartDateString计费周期开始时间
TotalBandwidthLong总带宽
TotalTrafficLong总流量
DateString出账时间
FlowOutint计费方式,0:日峰值带宽,95月95峰值带宽
TimeSpanString计费周期
ModeString当前计费方式描述


示例


请求示例 http://pcdn.aliyuncs.com/?SignatureVersion=1.0&Action=GetFeeHistory&Format=JSON&PageSize=10&Version=2017-04-11&Page=1&<公共参数>

返回示例JSON格式: {
    "FeeList": {
        "Fee": [
            {
                "EndDate": "2017-05-05 23:59:59",
                "StartDate": "2017-05-05 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-05-05",
                "FlowOut": 0,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-05-05 00:00:00 至 2017-05-05 23:59:59",
                "Mode": "日峰值带宽"
            },
            {
                "EndDate": "2017-05-04 23:59:59",
                "StartDate": "2017-05-04 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-05-04",
                "FlowOut": 0,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-05-04 00:00:00 至 2017-05-04 23:59:59",
                "Mode": "日峰值带宽"
            },
            {
                "EndDate": "2017-05-02 23:59:59",
                "StartDate": "2017-05-02 00:00:00",
                "TotalBandwidth": 123456789999,
                "Date": "2017-05-02",
                "FlowOut": 0,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-05-02 00:00:00 至 2017-05-02 23:59:59",
                "Mode": "日峰值带宽"
            },
            {
                "EndDate": "2017-04-30 23:59:59",
                "StartDate": "2017-04-01 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-04",
                "FlowOut": 95,
                "BusinessType": "live",
                "BillingType": 1,
                "TimeSpan": "2017-04-01 00:00:00 至 2017-04-30 23:59:59",
                "Mode": "月95峰值带宽"
            },
            {
                "EndDate": "2017-03-06 23:59:59",
                "StartDate": "2017-03-06 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-03-06",
                "FlowOut": 0,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-03-06 00:00:00 至 2017-03-06 23:59:59",
                "Mode": "日峰值带宽"
            },
            {
                "EndDate": "2017-02-28 23:59:59",
                "StartDate": "2017-02-01 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-02",
                "FlowOut": 95,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-02-01 00:00:00 至 2017-02-28 23:59:59",
                "Mode": "月95峰值带宽"
            },
            {
                "EndDate": "2017-01-31 23:59:59",
                "StartDate": "2017-01-01 00:00:00",
                "TotalBandwidth": 123456789999000,
                "Date": "2017-01-31",
                "FlowOut": 0,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2017-01-01 00:00:00 至 2017-01-31 23:59:59",
                "Mode": "日峰值带宽"
            },
            {
                "EndDate": "2016-12-31 23:59:59",
                "StartDate": "2016-12-01 00:00:00",
                "TotalBandwidth": 349539853000,
                "Date": "2016-12",
                "FlowOut": 95,
                "BusinessType": "vod",
                "BillingType": 1,
                "TimeSpan": "2016-12-01 00:00:00 至 2016-12-31 23:59:59",
                "Mode": "月95峰值带宽"
            }
        ]
    },
    "Pager": {
        "PageSize": 10,
        "Page": 1,
        "Total": 8
    },
    "Code": 0
}


XML格式 <?xml version="1.0" encoding="utf-8"?>
<GetFeeHistoryResponse>
  <FeeList>
    <Fee>
      <EndDate>2017-05-05 23:59:59</EndDate>
      <StartDate>2017-05-05 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-05-05</Date>
      <FlowOut>0</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-05-05 00:00:00 至 2017-05-05 23:59:59</TimeSpan>
      <Mode>日峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-05-04 23:59:59</EndDate>
      <StartDate>2017-05-04 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-05-04</Date>
      <FlowOut>0</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-05-04 00:00:00 至 2017-05-04 23:59:59</TimeSpan>
      <Mode>日峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-05-02 23:59:59</EndDate>
      <StartDate>2017-05-02 00:00:00</StartDate>
      <TotalBandwidth>123456789999</TotalBandwidth>
      <Date>2017-05-02</Date>
      <FlowOut>0</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-05-02 00:00:00 至 2017-05-02 23:59:59</TimeSpan>
      <Mode>日峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-04-30 23:59:59</EndDate>
      <StartDate>2017-04-01 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-04</Date>
      <FlowOut>95</FlowOut>
      <BusinessType>live</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-04-01 00:00:00 至 2017-04-30 23:59:59</TimeSpan>
      <Mode>月95峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-03-06 23:59:59</EndDate>
      <StartDate>2017-03-06 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-03-06</Date>
      <FlowOut>0</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-03-06 00:00:00 至 2017-03-06 23:59:59</TimeSpan>
      <Mode>日峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-02-28 23:59:59</EndDate>
      <StartDate>2017-02-01 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-02</Date>
      <FlowOut>95</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-02-01 00:00:00 至 2017-02-28 23:59:59</TimeSpan>
      <Mode>月95峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2017-01-31 23:59:59</EndDate>
      <StartDate>2017-01-01 00:00:00</StartDate>
      <TotalBandwidth>123456789999000</TotalBandwidth>
      <Date>2017-01-31</Date>
      <FlowOut>0</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2017-01-01 00:00:00 至 2017-01-31 23:59:59</TimeSpan>
      <Mode>日峰值带宽</Mode>
    </Fee>
    <Fee>
      <EndDate>2016-12-31 23:59:59</EndDate>
      <StartDate>2016-12-01 00:00:00</StartDate>
      <TotalBandwidth>349539853000</TotalBandwidth>
      <Date>2016-12</Date>
      <FlowOut>95</FlowOut>
      <BusinessType>vod</BusinessType>
      <BillingType>1</BillingType>
      <TimeSpan>2016-12-01 00:00:00 至 2016-12-31 23:59:59</TimeSpan>
      <Mode>月95峰值带宽</Mode>
    </Fee>
  </FeeList>
  <Pager>
    <PageSize>10</PageSize>
    <Page>1</Page>
    <Total>8</Total>
  </Pager>
  <Code>0</Code>
</GetFeeHistoryResponse>

展开
收起
云栖大讲堂 2017-10-27 16:55:07 2577 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Spring Boot2.0实战Redis分布式缓存 立即下载
CUDA MATH API 立即下载
API PLAYBOOK 立即下载