Any API or programmatic way to add users


#1

The admin guide has instructions about adding users from the Admin UI.

Is there any way to do this programmatically ? Either through an API or with some utility that might be available in the codebase ?

Thanks


Programmatic way to add Users?
#2

I got some ideas from here : External HTTP API?

In case anyone else has similar needs this might be helpful please refer below. But before that please look into the api (https://github.com/metabase/metabase/blob/master/src/metabase/api/user.clj) and ensure the JSON payload is upto date.

curl -X POST
-H “Cookie: metabase.SESSION_ID=XXXXXXXXXXXXXXX”
-H “Content-Type: application/json”
-d ‘{“first_name” : “FIRSTNAME”, “last_name”: “LASTNAME” , “email”: “EMAIL” , “password” : “PASSWORD” }’
http://YOURHOST:PORT/api/user


Programmatic way to add Users?