billing instance usage per user

asked 2016-10-11 12:32:52 -0600

I'm using python to write a web app that bills users per instance based on cores * hours calculated from creation to deletion. A user with a custom role would be able to access this information. Currently I'm hitting the database to get this information, but am considering using the api instead, which I am already using for authentication.

Is there any way for a user with a custom role to use the api access an instance's created_at and deleted_at for all instances of a tenant, and all of the user ids and names associated with that tenant?

I'd prefer to not use the admin api if possible, but if necessary would that be preferable to hitting the database directly?

Thanks

edit retag flag offensive close merge delete