Comments (6)
I believe the backends
that are used in the get_analytics_for_users.py
script are pulled from a separate csv file named analytics_data.csv
. If by automating it you mean pulling all backends and then inputting each backend for each given user, then that would technically be possible, but would require reworking the script a bit. The endpoint to retrieve all available backends would also depend on the level in the Hub/Group/Project hierarchy that you want to retrieve the backends for.
I guess my main question is, are you trying to automatically retrieve all backends for a specific level in that hierarchy to then retrieve analytics for each of those backends? Or is it something else?
from hub-automation.
To respond to your main question- I am trying to do exactly that. Automatically retrieve all backends
for a specific level in the hierarchy and then retrieve analytics for each of those backends
. Ideally we could make a get
request to an endpoint and receive a JSON response with a list of backends
, and then that would allow us to pass the backend
name to the system-usage
endpoint directly (via correctly defined options
- line 216) without the need for a csv
file at all.
It might be easier if I just describe exactly what our goal is initially. We are looking to retrieve all of the analytics data available to us via get
requests (probably once daily), store that data in a database, and then display that data to users in a meaningful and easily accessible way. This would be a long-running service that requires no manual intervention at all.
I understand that some users of this client may need the csv
file workflow, but for our needs we only need the endpoints and then we handle the responses. The usage of the endpoints themselves is straightforward and documented via the source code itself. This being said- if you did decide to provide us with this endpoint and would like for it to be included in the client either as a standalone new script or integrated into get_analytics_for_users.py
, I would be happy to do that work myself and open a PR (and make any changes desired, etc).
I realize my response is rather long-winded, but I hope that this provides more clarification as far as what I am actually trying to do.
from hub-automation.
There are endpoints from which you can retrieve a list of backends.
Hub Level (Must be Hub admin):
GET Network/{hubName}/devices
Group Level (this one does not have a direct devices endpoint, so you must pull from all Hub data. Must be a Hub admin):
GET Network/{hubName}
(then parse down to the groups list, pick your specific group, and parse down to the device list in that group)
Project Level (Must be at least Group Admin):
GET Network/{hubName}/Groups/{groupName}/Projects/{projectName}/devices
from hub-automation.
@pshires, is this something you feel comfortable working with? If so, we can help by reviewing PRs or proposed implementation. Please let us know.
from hub-automation.
@kwehden , this is exactly what I was hoping to get. I've tested out the endpoints and seen the responses- the info I need is there. Thank you @Matt-Stypulkoski
Would you all like me to open a PR that adds a new script using these endpoints? I'd be happy to do that and make desired changes, etc.
from hub-automation.
Absolutely! Please do! We'd be happy to review and add! Please tag myself and @Matt-Stypulkoski for review
from hub-automation.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hub-automation.