Vinod_Kumar
Intern
Intern
  • UID8803
  • Fans0
  • Follows0
  • Posts2
Reads:2473Replies:2

[Forum Admin]AliBaba BOA Service

Created#
More Posted time:Feb 13, 2020 16:43 PM
I was trying to get some data by using one of the api call QueryInstanceBill
The resulted JSON seems to be long and there is no date column to filter on how i got those many records.
Could someone here help me out

kcloud
Engineer
Engineer
  • UID7778
  • Fans0
  • Follows0
  • Posts52
1st Reply#
Posted time:Feb 15, 2020 0:22 AM
QueryInstanceBill API returns data for billing cycle which is usually for a month (YYYY-MM)

If you want data for a particular date then in request parameter provide the value for field "BillingDate" in format: YYYY-MM-DD
and the value for field "Granularity" should be "DAILY"

Check out the documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm

Also, you can use OpenAPI Explorer, I have provided BillingCycle as "2019-10", BillingDate as "2019-10-15" and Granularity as "DAILY":
https://api.aliyun.com/#/?product=BssOpenApi&version=2017-12-14&api=QueryInstanceBill&params={%22RegionId%22:%22cn-hangzhou%22,%22Granularity%22:%22DAILY%22,%22BillingCycle%22:%222019-10%22,%22BillingDate%22:%222019-10-15%22}&tab=DEMO&lang=JAVA

Vinod_Kumar
Intern
Intern
  • UID8803
  • Fans0
  • Follows0
  • Posts2
2nd Reply#
Posted time:Feb 19, 2020 19:11 PM
Thanks for the reply @kcloud. I was able to get the records. Here are few thing that i need to clarify.

1.  I pulled records using  below parameters
      

                 var queryBillOverviewRequest = new QueryInstanceBillRequest();
                    queryBillOverviewRequest.BillingCycle = "2020-01";
                    queryBillOverviewRequest.BillingDate = "2020-01-01";
                    queryBillOverviewRequest.Granularity = "DAILY";
                    queryBillOverviewRequest.IsBillingItem = true;

 but the report count and amount genererated from the portal is mismatching.

In Portal below is the path from where i am getting data.

BillManagement - > Bill - > Details  Tab

under that i have selected Billing Cycle as 2020-01, Statistic Item: Billing Item , Statistic Period: By Day.
Guest