There isn’t anything specific in the API involving billing. Billing is something of a black box for us, we just feed data to Stripe and it generates invoices. This is obviously not ideal so we hope to improve it, but it’ll be a while.
Fair enough, I’m looking more for the usage stats that go into generating billing. Bandwidth usage and VM usage. The usage query above just returns an empty array right now. Am I querying it wrong?
I see I can get some usage data out of:
{
organization(name: "orgname"){
billables(startDate: "2021-05-01", endDate: "2021-06-01"){
nodes{
app{
name
},
category,
product,
quantity,
time
}
}
}
}
That returns a listing for every billable product (vm time, bandwidth) for every app in an entire organization. In my use case there will be many apps under one organization, so this isn’t the ideal way I’d want to query this.
It would much nicer if the appUsage field returned the data just for that app, or if there was some way to filter a query like this by app id/name.
Is this API still available? I’m not seeing organization.billables in the Graphql docs. If not, what’s the current way to compute usage given a timeframe and app id?
The billables query became outdated so we removed it to prevent confusion.
We are currently working on improving visibility for usage data in our new usage pages like Usage Digest and many others announced on #fresh-produce . Feel free to drop in feedback on these topics.