Hi Marek,
Thanks for the link. Looks like it came up shortly before I posted.
I would like to first try the REST API as I can quickly whip up a BASH
script to perform the batch import. In 1.2.0.CR1's REST API
documentation, there doesn't seem to be an option to login as admin and
get the token.
Could you point out which URL I should call to login via curl on the CLI?
Thanks!
On 6/5/2015 10:33 PM, Marek Posolda wrote:
Hi,
we have some admin REST API documented and the operations you mentioned
should be available there:
http://docs.jboss.org/keycloak/docs/1.2.0.CR1/rest-api/overview-index.html
Maybe easiest solution for you would be to use our admin-client, which
allows to easily invoke REST endpoints as java methods and handles
obtain the accessToken for admin authentication too. If your
command-line has Java available, you can just run simple Java program,
which will use admin-client to invoke REST endpoints. The example for
admin client is here:
https://github.com/keycloak/keycloak/tree/master/examples/admin-client
Marek
On 5.5.2015 17:30, Eugene Chow wrote:
> Hi,
>
> First of all, a big thank you to the developers for an SSO that's simple
> to use and a beautiful interface to boot.
>
> I'm running Keycloak for an app in development. For UAT purposes, I need
> to batch import accounts from a CSV file via the command-line. I'm
> looking for the REST API to login as admin, get token, create new
> account, update new acct's password, and then logout. I haven't found
> any documentation on this.
>
> If the REST API is not equipped for this purpose, what would be the
> correct method to bulk import users?
>
> Thanks!