tencent cloud

Feedback

DescribeBillSummaryByProject

Last updated: 2024-05-16 15:10:01

    1. API Description

    Domain name for API request: billing.tencentcloudapi.com.

    Gets the bill summarized according to project

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeBillSummaryByProject.
    Version Yes String Common Params. The value used for this API: 2018-07-09.
    Region No String Common Params. This parameter is not required.
    BeginTime Yes String The value must be of the same month as EndTime. Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09, the data returned will be for the entire month of September 2018.
    EndTime Yes String The value must be of the same month as BeginTime. Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09, the data returned will be for the entire month of September 2018.
    PayerUin No String Queries bill data user's UIN

    3. Output Parameters

    Parameter Name Type Description
    Ready Integer Indicates whether the data is ready. 0: Not ready. 1: Ready. If Ready is 0, it indicates that the current UIN is initializing billing for the first time. Wait for 5-10 minutes and try again.
    SummaryOverview Array of ProjectSummaryOverviewItem Detailed cost distribution for all projects
    Note: This field may return null, indicating that no valid value was found.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 DescribeBillSummaryByProject

    DescribeBillSummaryByProject

    Input Example

    POST / HTTP/1.1Host: billing.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: DescribeBillSummaryByProject<Common request parameters>{    "EndTime": "2018-11",    "BeginTime": "2018-11"}
    

    Output Example

    {
        "Response": {
            "Ready": 1,
            "SummaryOverview": [
                {
                    "ProjectId": "0",
                    "RealTotalCost": "693.59753331",
                    "TotalCost": "1117.51686802",
                    "CashPayAmount": "-1.24511821",
                    "IncentivePayAmount": "694.84265152",
                    "VoucherPayAmount": "0.00000000",
                    "TransferPayAmount": "0.00000000",
                    "RealTotalCostRatio": "36.01",
                    "BillMonth": "2022-04",
                    "ProjectName": "Default project"
                },
                {
                    "ProjectId": "1161824",
                    "RealTotalCost": "692.84272353",
                    "TotalCost": "1067.95034395",
                    "CashPayAmount": "0.35221517",
                    "IncentivePayAmount": "692.49050836",
                    "VoucherPayAmount": "0.00000000",
                    "TransferPayAmount": "0.00000000",
                    "RealTotalCostRatio": "35.97",
                    "BillMonth": "2022-04",
                    "ProjectName": "Anma"
                },
                {
                    "ProjectId": "1178116",
                    "RealTotalCost": "363.78903384",
                    "TotalCost": "582.90620577",
                    "CashPayAmount": "0.46518134",
                    "IncentivePayAmount": "363.32385250",
                    "VoucherPayAmount": "0.00000000",
                    "TransferPayAmount": "0.00000000",
                    "RealTotalCostRatio": "18.89",
                    "BillMonth": "2022-04",
                    "ProjectName": "Open platform"
                },
                {
                    "ProjectId": "1229753",
                    "RealTotalCost": "175.91070932",
                    "TotalCost": "293.01647591",
                    "CashPayAmount": "0.42772170",
                    "IncentivePayAmount": "175.48298762",
                    "VoucherPayAmount": "0.00000000",
                    "TransferPayAmount": "0.00000000",
                    "RealTotalCostRatio": "9.13",
                    "BillMonth": "2022-04",
                    "ProjectName": "Cloud"
                }
            ],
            "RequestId": "7651899f-01c5-4988-b203-59eae7e55272"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError Internal error.
    InternalError.GatewayError Gateway error.
    InternalError.UnknownError Undefined exception.
    InvalidParameter Invalid parameter.
    InvalidParameterValue Invalid parameter value.