DescribeMonthlyBillSummary

1. API Description

This API is used to query monthly spend by product or by resource group.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

summaryType

No

Query bills by by product or by resource group. Default value: PRODUCT

billMonthly

No

Integer

Month of the bill.

Default value: the current month.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

billMonthly

Integer

Month of the bill.

totalSpend

Double

Total spend

totalCash

Double

Total cash.

totalRefund

Double

Total refund.

totalVoucher

Double

Total voucher.

summaryInfoList

List of bill data.

4. Code Example

Query monthly spend.

POST /api/v2/zbc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeMonthlyBillSummary
<Common Request Params>

Request:
{
  "billMonthly": 202307,
  "summaryType":"RESOURCE_GROUP"
}

Response:
{
    "requestId": "T7BAF1918-4900-4CBC-B2AD-08A11854DBDD",
    "response": {
        "billMonthly": 202307,
        "totalSpend": 3781.650000,
        "summaryInfoList": [
            {
                "product": null,
                "resourceGroupName": "Default Resource Group",
                "voucher": 0.000000,
                "spend": 1732.650000,
                "resourceGroupId": "29b4a7bd-b1c7-4f81-b2cb-d75084811ca9",
                "cash": 3781.650000,
                "refund": 2049.000000
            }
        ],
        "requestId": "T7BAF1918-4900-4CBC-B2AD-08A11854DBDD",
        "totalVoucher": 0.000000,
        "totalRefund": 2049.000000,
        "totalCash": 1732.650000
    }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

No error codes related to the API business logic. For other error codes, see Common Error Codes.​​

Last updated