How to create a new realm with Keycloak in Version 20.0.1, REST API and cURL?

In this blog post I want to show, how to create a new realm with Keycloak REST API 20.0.1. The Keycloak API has changed and my older blog post How to create a new realm with the Keycloak REST API? doesn’t work anymore for version 20.0.1. I automate the Keycloak realm creation for an example realm by using cURL in a bash script. First I created the blog post about Export a Keycloak (Version 20) realm and now I show the creation of an example realm in Keycloak. I took a look in the new Keycloak REST API documentation and into the Keycloak Node.js client. In this blog post I use an example realm I exported before, here is the link to the example-realm.

Export a Keycloak realm by using the version 20.0.1

This blog post is about how export an example development realm using the Keycloak in version 20. I wanted to ensure that the export contains all information including users. You can find the relevant information in the Keycloak documentation ‘Exporting a realm to a file.’. I did some demo configurations in the new version and I can’t reuse my older exported examples from Keycloak.

Upload an user to Keycloak using CURL

In this blog post I want to briefly show, how I implemented the upload of an user to Keycloak with CURL in a bash script. I came across a helpful blog post (Keycloak REST API: Create a New User), but this blog post didn’t contain the information: How to set the password for the user?

Blog at WordPress.com.

Up ↑