调用GetFeeHistory获取计费数据历史记录。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String GetFeeHistory

系统规定参数,取值:GetFeeHistory

Page String 1

当前页码。

PageSize String 10

每页的记录条数。

Version String 2017-04-11

版本号。

返回数据

名称 类型 示例值 描述
Code Integer 0

业务码,成功返回0。

FeeList Array of Fee

返回的计费信息列表。

Fee
BusinessType String live

业务类型。

Date String 2017-05-05

出账时间。

EndDate String 2017-05-05 23:59:59

计费周期结束时间。

FlowOut Integer 0

计费方式。取值:

  • 0:日峰值带宽。
  • 95:月95峰值带宽。
LevelThreeBandwidth Integer 999000

带宽。

LevelThreeTraffic Integer 12345678

流量。

LevelTwoBandwidth Integer 999000

带宽。

LevelTwoTraffic Integer 12345678

流量。

Mode String 日峰值带宽

当前计费方式描述。

ResourceId String 6aphce

资源ID。

StartDate String 2017-05-05 00:00:00

计费周期开始时间。

TimeSpan String 2017-05-05 00:00:00 至 2017-05-05 23:59:59

计费周期。

TotalBandwidth Integer 89999000

总带宽。

TotalTraffic Integer 12345678

总流量。

Pager Struct

分页信息。

Page Integer 1

当前页码。

PageSize Integer 10

每页的记录条数。

Total Integer 8

总记录的条数。

RequestId String 5CED561E-A4E3-4842-8BB6-700BE2AE7784

请求ID。

示例

请求示例

http(s)://pcdn.aliyuncs.com/?Action=GetFeeHistory
&Page=1
&PageSize=10
&Version=2017-04-11
&<公共请求参数>

正常返回示例

XML格式

<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>
    </FeeList>
    <Pager>
        <PageSize>10</PageSize>
        <Page>1</Page>
        <Total>8</Total>
    </Pager>
    <Code>0</Code>
</GetFeeHistoryResponse>

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,
              "ResourceId": "lrntfr",
                "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,
              "ResourceId": "lrgtfr",
                "TimeSpan": "2017-05-04 00:00:00 至 2017-05-04 23:59:59",
                "Mode": "日峰值带宽"
            }
        ]
    },
    "Pager": {
        "PageSize": 10,
        "Page": 1,
        "Total": 8
    },
    "Code": 0
}

错误码

HttpCode 错误码 错误信息 描述
400 MissingParameter You must specify domainName. 请求中缺少必要的参数domainName

访问错误中心查看更多错误码。