Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example to generate a new bill #1

Open
tschoergez opened this issue Mar 2, 2021 · 1 comment
Open

Add an example to generate a new bill #1

tschoergez opened this issue Mar 2, 2021 · 1 comment

Comments

@tschoergez
Copy link
Owner

No description provided.

@tschoergez
Copy link
Owner Author

Steps to create a bill in Tenant App with API

Get an Authentication Token:

POST /suite-api/api/auth/token/acquire
Content-Type: application/json
JSON:
{
“username” : “”,
“password” : “”
}

Get Pricing Policy ID:

GET /suite-api/internal/metering
Headers:
Authorization: vRealizeOpsToken
Accept: application/json
X-vRealizeOps-API-use-unsupported: True

Look for id=“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx” near name=“”

Get OVDC Identifier:

GET /suite-api/api/resources?adapterKind=vCloud&resourceKind=ORG_VDC
Headers:
Authorization: vRealizeOpsToken
Accept: application/json

Look for “name”: “”, then look at the bottom of that section for “identifier”: “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”

Create a Bill:

POST /tenant-app-api/bills
Headers:
Authorization: vRealizeOpsToken
Accept: application/json
Content-Type: application/json
JSON:
{
“endTime”: 1614470400000,
“policyID”: “”
“resourceIds”: [
“”
],
“startTime”: 1612137600000,
“title”: “<title for bill>”
}

Note: Times are epoch. Times above are Feb. 1-28, 2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant