Page 1 of 1

user management: upload a structured list vs indiv. entries

PostPosted: Thu Nov 16, 2017 5:00 pm
by knechtberry
Hi Subsonic-community!

Setting user credentials one by one is cumbersome and prohibitive.

What is the best way to define several users at once in a structured way?
Is it possible to upload a CSV/XML ... whatever ... containing the UID, PWD, eMail and possible the user pic + initial settings?

keen to learn:
-sk.

Re: user management: upload a structured list vs indiv. entr

PostPosted: Thu Nov 16, 2017 10:45 pm
by toolman
You could use the api CreateUser ( http://www.subsonic.org/pages/api.jsp#createUser)

Re: user management: upload a structured list vs indiv. entr

PostPosted: Wed Nov 22, 2017 9:23 am
by knechtberry
sounds like a hit -- will do, try (newbie).

thanks a lot!
-sk.

Re: user management: upload a structured list vs indiv. entr

PostPosted: Thu Nov 23, 2017 7:03 am
by knechtberry
Hi
toolman wrote:You could use the api CreateUser ( http://www.subsonic.org/pages/api.jsp#createUser)


oops - I understand what an API does ... yet I have zero zilch nada capabilities calling it as I am not capable of programming anything (yeah, that creatures exist).

How could I use the scenario, say ... if I'm providing a list of user credential attributes as defined in the API elements: how I'd post/send it to the REST part on the other end?

And: I assume this needs to be the actual machine my subsonic server is running on (here: a RPI running within my home LAN)

questions, questions ... supposedly dump ;+)

Re: user management: upload a structured list vs indiv. entr

PostPosted: Thu Nov 23, 2017 7:04 am
by knechtberry
Hi
toolman wrote:You could use the api CreateUser ( http://www.subsonic.org/pages/api.jsp#createUser)


oops - I understand what an API does ... yet I have zero zilch nada capabilities calling it as I am not capable of programming anything (yeah, that creatures exist).

How could I use the scenario, say ... if I'm providing a list of user credential attributes as defined in the API elements: how I'd post/send it to the REST part on the other end?

And: I assume this needs to be the actual machine my subsonic server is running on (here: a RPI running within my home LAN)

questions, questions ... supposedly dump ;+)

Re: user management: upload a structured list vs indiv. entr

PostPosted: Thu Nov 23, 2017 4:11 pm
by toolman
Hi,
I have to admit that i'm no programmer either and documentation on how to use an api in Subsonic isn't very clear.
Anyway, I found out that using the next line creates a new user on my Subsonic server.
http://MYDOMAIN.SUBSONIC.ORG/rest/createUser?u=ADMIN&p=PASSWORD_ADMIN&v=1.12.0&c=myap&username=NEW_USER&password=WELCOME_NEW_USER&email=joe@foobar.com
mydomain.subsonic.org= the web-adress to your subsonicserver.
u= name of someone with admin privileges.
p= adminpassword
username=name of new user
password=password of new user
email=email adress of new user.
Studying the different parameters which you can specify it seems to me that it should be possible to manage your users without too much difficulties.
Also there are some more api's to manage your users:
getUser getUsers createUser updateUser deleteUser changePassword
Perhaps some reading will help you some more: http://www.subsonic.org/pages/api.jsp

Re: user management: upload a structured list vs indiv. entr

PostPosted: Thu Nov 23, 2017 6:29 pm
by knechtberry
Oh!

So I recon, calling a URL equals a REST-call ... which makes it easy -- the parameters can be constructed and joined likewise.

Thank you very much,
that seems to be a sweet solution path!

-sk.