user management: upload a structured list vs indiv. entries

Need help? Post your questions here.

Moderator: moderators

user management: upload a structured list vs indiv. entries

Postby knechtberry » Thu Nov 16, 2017 5:00 pm

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.
User avatar
knechtberry
 
Posts: 9
Joined: Tue Mar 14, 2017 10:06 pm
Location: Munich, Germany

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

Postby toolman » Thu Nov 16, 2017 10:45 pm

You could use the api CreateUser ( http://www.subsonic.org/pages/api.jsp#createUser)
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

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

Postby knechtberry » Wed Nov 22, 2017 9:23 am

sounds like a hit -- will do, try (newbie).

thanks a lot!
-sk.
User avatar
knechtberry
 
Posts: 9
Joined: Tue Mar 14, 2017 10:06 pm
Location: Munich, Germany

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

Postby knechtberry » Thu Nov 23, 2017 7:03 am

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 ;+)
User avatar
knechtberry
 
Posts: 9
Joined: Tue Mar 14, 2017 10:06 pm
Location: Munich, Germany

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

Postby knechtberry » Thu Nov 23, 2017 7:04 am

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 ;+)
User avatar
knechtberry
 
Posts: 9
Joined: Tue Mar 14, 2017 10:06 pm
Location: Munich, Germany

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

Postby toolman » Thu Nov 23, 2017 4:11 pm

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
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

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

Postby knechtberry » Thu Nov 23, 2017 6:29 pm

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.
User avatar
knechtberry
 
Posts: 9
Joined: Tue Mar 14, 2017 10:06 pm
Location: Munich, Germany


Return to Help

Who is online

Users browsing this forum: No registered users and 8 guests