Am actually looking for an example like the AdminClient.

Once you create your post like this :

HttpPost post = new HttpPost(KeycloakUriBuilder.fromUri(getBaseUrl() + "/auth").path(ServiceUrlConstants.REALM_INFO_PATH).build(realmName));

List <NameValuePair> formparams = new ArrayList <NameValuePair>();

formparams.add(new BasicNameValuePair("username", username));

formparams.add(new BasicNameValuePair("password", password));

formparams.add(new BasicNameValuePair(OAuth2Constants.CLIENT_ID, clientIdOrApplicationName));

UrlEncodedFormEntity form = new UrlEncodedFormEntity(formparams, "UTF-8");

post.setEntity(form);

How do you send your realm representation ?

On Tue, Sep 30, 2014 at 12:00 PM, Stian Thorgersen <stian@redhat.com> wrote:
If you're doing it from Java the admin client makes this very simple:

  https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/RealmTest.java

otherwise look at the rest docs:

  http://docs.jboss.org/keycloak/docs/1.0.1.Final/rest-api/overview-index.html

----- Original Message -----
> From: "Alexander Chriztopher" <alexander.chriztopher@gmail.com>
> To: keycloak-user@lists.jboss.org
> Sent: Tuesday, 30 September, 2014 11:55:59 AM
> Subject: [keycloak-user] Realm update through REST API
>
> Hi guys,
>
> Just wondering wether you have an example to do any kind of update on a realm
> through REST.
>
> Many thanks for any help.
>
> Regards.
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user