Keycloak Roles API

Manage realm-level and client-level roles

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 28

GET /admin/realms/{realm}/clients/{client-uuid}/roles Get all roles for the realm or client #
POST /admin/realms/{realm}/clients/{client-uuid}/roles Create a new role for the realm or client #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name} Get a role by name #
PUT /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name} Update a role by name #
DELETE /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name} Delete a role by name #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites Get composites of the role #
POST /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites Add a composite to the role #
DELETE /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites Remove roles from the role's composite #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites/clients/{targetClientUuid} Get client-level roles for the client that are in the role's composite #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites/realm Get realm-level roles of the role's composite #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/groups Returns a stream of groups that have the specified role name #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/management/permissions Return object stating whether role Authorization permissions have been… #
PUT /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/management/permissions Return object stating whether role Authorization permissions have been… #
GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/users Returns a stream of users that have the specified role name #
GET /admin/realms/{realm}/roles Get all roles for the realm or client #
POST /admin/realms/{realm}/roles Create a new role for the realm or client #
GET /admin/realms/{realm}/roles/{role-name} Get a role by name #
PUT /admin/realms/{realm}/roles/{role-name} Update a role by name #
DELETE /admin/realms/{realm}/roles/{role-name} Delete a role by name #
GET /admin/realms/{realm}/roles/{role-name}/composites Get composites of the role #
POST /admin/realms/{realm}/roles/{role-name}/composites Add a composite to the role #
DELETE /admin/realms/{realm}/roles/{role-name}/composites Remove roles from the role's composite #
GET /admin/realms/{realm}/roles/{role-name}/composites/clients/{targetClientUuid} Get client-level roles for the client that are in the role's composite #
GET /admin/realms/{realm}/roles/{role-name}/composites/realm Get realm-level roles of the role's composite #
GET /admin/realms/{realm}/roles/{role-name}/groups Returns a stream of groups that have the specified role name #
GET /admin/realms/{realm}/roles/{role-name}/management/permissions Return object stating whether role Authorization permissions have been… #
PUT /admin/realms/{realm}/roles/{role-name}/management/permissions Return object stating whether role Authorization permissions have been… #
GET /admin/realms/{realm}/roles/{role-name}/users Returns a stream of users that have the specified role name #

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-roles-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-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Roles API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:


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