Skip to content

API Automation

Cloud-IAM API

Cloud-IAM API is the best way to automate everything. From deployments lifecycle management to keycloak extension uploads !

Cloud-IAM API access is only available for dedicated deployments (starting with Little Bunny plan).

In order to authenticate against Cloud-IAM API, first create a service account to use a dedicated CLIENT_ID and CLIENT_SECRET then authenticate against Cloud-IAM REST API using this service account as follows:

curl and jq are required to run the example below:

shell
# retrieve a short-lived (expires after 2 minutes) access token
SA_CLIENT_ID=sa_xxxxx
SA_CLIENT_SECRET=xxxx
TOKEN=$(curl https://iam.cloud-iam.com/auth/realms/cloud-iam/protocol/openid-connect/token \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials&client_id=${SA_CLIENT_ID}&client_secret=${SA_CLIENT_SECRET}" \
     | jq -r .access_token)
# retrieve a short-lived (expires after 2 minutes) access token
SA_CLIENT_ID=sa_xxxxx
SA_CLIENT_SECRET=xxxx
TOKEN=$(curl https://iam.cloud-iam.com/auth/realms/cloud-iam/protocol/openid-connect/token \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials&client_id=${SA_CLIENT_ID}&client_secret=${SA_CLIENT_SECRET}" \
     | jq -r .access_token)

Resource