Then I think users.get_all
would be right up your alley 🙂
it's not supported natively in the APIClient
I wouldn't mind going the requests
route if I could find the API end point from the SDK?
SuccessfulKoala55 , is this hack applicable for most API calls in ClearML?
It's of course not an MLOps issue so I understand it's not high on the priority list, but would be kinda cool to just have a simple view presenting the content of users.get_all
😄
I think that users in open source are admins by default
Sorry, not necessarily RBAC (although that is tempting 😉 ), but for now was just wondering if an average joe user has access to see the list of "registered users"?
So no direct page to see e.g. how many people have registered and/or if someone accidentally made two (or more) accounts, or somewhere to just delete users, etc
The UI uses it to access the list of users for presenting in the tasks table 🙂
I couldn't find it directly in the SDK at least (in the APIClient)... 🤔
On it! Should I include the additional user filters described above?
So some UI that shows the contents of users.get_all
?
Don't even need to specify json=...
😉 Thanks!
Oh, well, yes, but then you'll get all the users 🙂
Yeah that works fine 😄 I just fetch it once to map argparse users to their IDs for later filtering.
The Slack Monitoring example should be updated btw, as they now use slack_sdk
instead of slack
(in the import statements)
clearml.backend_api.session.defs.ENV_HOST.get()
did not work unfortunately 🤔
Ah, the API server /users.get_all
, I see!
I think you can just send empty payload for users.get_all
like this {}
and it will return all the users in your database 🙂
Yeah, but I wouldn't recommend doing it 🙂
Follow up on this btw, from the WebUI/Server POV, I see there's an "Admin" role, etc. Do those have additional views available, such as users etc?
For getting user info I guess that's a reasonable hack with not much risk
you can hack it with something like:Task._get_default_session().send_request("users", "get_all", json={"id": [<user-id>]})
RBAC is something you have in the paid versions 🙂
you're better off with the default session - you need the auth info there on top of the endpoint