Keycloak Realms Admin API

The Realms Admin API from Keycloak — 28 operation(s) for realms admin.

Operations 45

GET /admin/realms Get accessible realms Returns a list of accessible realms. #
POST /admin/realms Import a realm. Imports a realm from a full representation of that realm #
GET /admin/realms/{realm} Get the top-level representation of the realm It will not include nested… #
PUT /admin/realms/{realm} Update the top-level information of the realm Any user, roles or client… #
DELETE /admin/realms/{realm} Delete the realm #
GET /admin/realms/{realm}/admin-events Get admin events Returns all admin events, or filters events based on URL query… #
DELETE /admin/realms/{realm}/admin-events Delete all admin events #
POST /admin/realms/{realm}/client-description-converter Base path for importing clients under this realm #
GET /admin/realms/{realm}/client-policies/policies Get admin realms by realm client policies policies #
PUT /admin/realms/{realm}/client-policies/policies Replace admin realms by realm client policies policies #
GET /admin/realms/{realm}/client-policies/profiles Get admin realms by realm client policies profiles #
PUT /admin/realms/{realm}/client-policies/profiles Replace admin realms by realm client policies profiles #
GET /admin/realms/{realm}/client-session-stats Get client session stats Returns a JSON map #
GET /admin/realms/{realm}/client-types List all client types available in the current realm #
PUT /admin/realms/{realm}/client-types Update a client type #
GET /admin/realms/{realm}/credential-registrators Get admin realms by realm credential registrators #
GET /admin/realms/{realm}/default-default-client-scopes Get realm default client scopes. Only name and ids are returned #
PUT /admin/realms/{realm}/default-default-client-scopes/{clientScopeId} Replace admin realms by realm default default client scopes by client scope id #
DELETE /admin/realms/{realm}/default-default-client-scopes/{clientScopeId} Delete admin realms by realm default default client scopes by client scope id #
GET /admin/realms/{realm}/default-groups Get group hierarchy. Only name and ids are returned #
PUT /admin/realms/{realm}/default-groups/{groupId} Replace admin realms by realm default groups by group id #
DELETE /admin/realms/{realm}/default-groups/{groupId} Delete admin realms by realm default groups by group id #
GET /admin/realms/{realm}/default-optional-client-scopes Get realm optional client scopes. Only name and ids are returned #
PUT /admin/realms/{realm}/default-optional-client-scopes/{clientScopeId} Replace admin realms by realm default optional client scopes by client scope id #
DELETE /admin/realms/{realm}/default-optional-client-scopes/{clientScopeId} Delete admin realms by realm default optional client scopes by client scope id #
GET /admin/realms/{realm}/events Get events Returns all events, or filters them based on URL query parameters… #
DELETE /admin/realms/{realm}/events Delete all events #
GET /admin/realms/{realm}/events/config Get the events provider configuration Returns JSON object with events provider… #
PUT /admin/realms/{realm}/events/config Replace admin realms by realm events config #
GET /admin/realms/{realm}/group-by-path/{path} Get admin realms by realm group by path by path #
GET /admin/realms/{realm}/localization Get admin realms by realm localization #
GET /admin/realms/{realm}/localization/{locale} Get admin realms by realm localization by locale #
POST /admin/realms/{realm}/localization/{locale} Import localization from uploaded JSON file #
DELETE /admin/realms/{realm}/localization/{locale} Delete admin realms by realm localization by locale #
GET /admin/realms/{realm}/localization/{locale}/{key} Get admin realms by realm localization by locale by key #
PUT /admin/realms/{realm}/localization/{locale}/{key} Replace admin realms by realm localization by locale by key #
DELETE /admin/realms/{realm}/localization/{locale}/{key} Delete admin realms by realm localization by locale by key #
POST /admin/realms/{realm}/logout-all Removes all user sessions #
POST /admin/realms/{realm}/partial-export Partial export of existing realm into a JSON file #
POST /admin/realms/{realm}/partialImport Partial import from a JSON file to an existing realm #
POST /admin/realms/{realm}/push-revocation Push the realm's revocation policy to any client that has an admin url… #
DELETE /admin/realms/{realm}/sessions/{session} Remove a specific user session #
POST /admin/realms/{realm}/testSMTPConnection Test SMTP connection with current logged in user #
GET /admin/realms/{realm}/users-management-permissions Get admin realms by realm users management permissions #
PUT /admin/realms/{realm}/users-management-permissions Replace admin realms by realm users management permissions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/keycloak:keycloak-realms-admin-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

keycloak-realms-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Realms Admin API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:


# --- truncated at 32 KB (85 KB total) ---
# Full source: https://artifacts.apis.io/keycloak/openapi/keycloak-realms-admin-api-openapi.yml