Closed 10d9e closed 1 year ago
cc: @jimmylee - for tracking. A few suggestions:
import requests
spreadsheet_id = "YOUR_SPREADSHEET_ID" range = "Sheet1!A1:C3" api_key = "YOUR_API_KEY"
api_url = f"https://sheets.googleapis.com/v4/spreadsheets/{spreadsheet_id}/values/{range}" headers = {"Authorization": f"Bearer {api_key}"}
response = requests.get(api_url, headers=headers)
if response.status_code == 200: data = response.json() print(data) else: print("Error:", response.status_code)
2. Create/use a database or use a customer management tool that @corinne-antonia et al work with to onboard data and product reports from
3. Create a solution that queries our infra directly, using AWX or some other backend API (cc: @Zorlin) to show the different namespaces, and the individual `delta` apis within each namespace. The REST application flow:
- Query all namespaces from AWX
- Query `delta` for stats in each namespace (ie. https://hackfs.delta.estuary.tech/open/stats/totals/info ) and add them a list
- Return the list
example output:
{ "results":[ { "client_info":{ "name":"hackfs", "email":"email@domain.com", "contact":"Jane Doe" }, "stats":{ "total_content_consumed":4828, "total_e2e_deals":3073, "total_e2e_deals_in_bytes":148737588288, "total_import_deals":0, "total_import_deals_in_bytes":0, "total_miners":56, "total_piece_commitment_made":2735, "total_piece_committed":1000, "total_proposal_made":1011, "total_proposal_sent":3, "total_sealed_deal_in_bytes":44298575360, "total_storage_allocated":148737588288, "total_transfer_finished":662, "total_transfer_started":0 } }, { "client_info":{ "name":"radiant earth", "email":"email@domain.com", "contact":"Anna Doe" }, "stats":{ "total_content_consumed":4828, "total_e2e_deals":3073, "total_e2e_deals_in_bytes":148737588288, "total_import_deals":0, "total_import_deals_in_bytes":0, "total_miners":56, "total_piece_commitment_made":2735, "total_piece_committed":1000, "total_proposal_made":1011, "total_proposal_sent":3, "total_sealed_deal_in_bytes":44298575360, "total_storage_allocated":148737588288, "total_transfer_finished":662, "total_transfer_started":0 } } ] }
Update - we just need the namespace or username @Zorlin cc: @jimmylee
Thanks for putting this together, however I just need a way to query the usernames/namespaces and I can generate everything else myself.
Here it is @jimmylee @jlogelin
In order to integrate with front end reporting tools/dashboarding, we need a RESTful view into our customer database. This should reflect the same information as our Onboarding sheet.
Specific requirements: