The API call POST /tenant-app-api/bills has been replaced with POST /tenant-app-api/bills/create in Chargeback 8.10.x
search cancel

The API call POST /tenant-app-api/bills has been replaced with POST /tenant-app-api/bills/create in Chargeback 8.10.x

book

Article ID: 325776

calendar_today

Updated On:

Products

VMware VMware Aria Suite

Issue/Introduction

  • The purpose of this article is to explain the change required to the new API call for it to generate bills correctly.


Symptoms:
  • Customers who previously used the POST /tenant-app-api/bills API call to generate bills will have noticed the API has been deprecated and replaced with POST /tenant-app-api/bills/create 
  • The new POST /tenant-app-api/bills/create call will fail to generate bills.


Environment

VMware Aria Operations 8.12.x
VMware Chargeback 8.10
VMware vRealize Operations 8.10.x

Cause

  • The default parameters required for the API call to succeed are listed incorrectly in the UI.

Resolution

  • This issue will be resolved in the next release of Chargeback due in Q1/Q2 2024.



Workaround:

  • Browse to https://CHARGEBACK_IP_HERE/tenant-app-api/swagger-ui/index.html
  • Acquire a token using the POST /tenant-app-api/api/suiteapi/internal/auth/token/acquire API call
  • Select the new POST /tenant-app-api/bills/create API call and ensure to prefix the token with vRealizeOpsToken 
  • Use the GET /tenant-app-api/bills/billable/resources API to fetch the resources (ORG and OVDCs under it and use the resourceId for bill generation).
  • To fetch the pricingPolicies present in the system use GET /suite-api/internal/metering API and use id of the policy.
  • If you want to generate a bill only for ORG then just populate the parent’s “rootResource” and keep “childResources”:[]
  • If you want to generate a bill only for OVDC then just populate the “childResources” “rootResource” and keep parent’s “rootResource”:null
  • If you want to generate a bill for both ORG and OVDC then populate both.



Additional Information

Impact/Risks:
  • There is no impact to the Chargeback appliance by performing the listed workaround.