Keycloak Protocol Mappers API

The Protocol Mappers API from Keycloak — 12 operation(s) for protocol mappers.

GitHub OpenAPI

Operations 21

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/add-models Create several mappers on a client scope · Create multiple mappers #
Ask an LLM
“How do I bulk-add protocol mappers to a client scope?”
“Can I add multiple mappers to a client scope in one request?”
Tell an agent
Create multiple mappers on client scope {client_scope_id} in realm {realm}.
Bulk-add these protocol mapper models to client scope {client_scope_id} of {realm}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models List mappers on a client scope · Get mappers #
Ask an LLM
“What protocol mappers are attached to a client scope?”
“Can I see all mappers defined on a client scope?”
Tell an agent
List the mappers on client scope {client_scope_id} in realm {realm}.
Show every protocol mapper defined on client scope {client_scope_id} of {realm}.
POST /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models Create a mapper on a client scope · Create a mapper #
Ask an LLM
“How do I add a single protocol mapper to a client scope?”
“Can I set consent text and config when adding a mapper to a client scope?”
Tell an agent
Create a {protocol_mapper} mapper named {name} on client scope {client_scope_id} in {realm}.
Add a new protocol mapper {name} to client scope {client_scope_id} of {realm} with config {config}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id} Get a mapper on a client scope · Get mapper by id #
Ask an LLM
“How do I read one protocol mapper from a client scope?”
“What config does a specific mapper on a client scope have?”
Tell an agent
Get mapper {id} on client scope {client_scope_id} in realm {realm}.
Show the settings of protocol mapper {id} attached to client scope {client_scope_id} of {realm}.
PUT /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id} Update a mapper on a client scope · Update the mapper #
Ask an LLM
“How do I change the config of a mapper on a client scope?”
“Can I rename a protocol mapper attached to a client scope?”
Tell an agent
Update mapper {id} on client scope {client_scope_id} in realm {realm}.
Change the config of existing mapper {id} on client scope {client_scope_id} of {realm} to {config}.
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id} Delete a mapper from a client scope · Delete the mapper #
Ask an LLM
“How do I remove a protocol mapper from a client scope?”
“Can I delete one mapper from a client scope by id?”
Tell an agent destructive · confirm first
Delete mapper {id} from client scope {client_scope_id} in realm {realm}.
Remove protocol mapper {id} from client scope {client_scope_id} of {realm}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/protocol/{protocol} List a client scope's protocol mappers · Get mappers by name for a specific protocol #
Ask an LLM
“Which protocol mappers are configured on a client scope?”
“Can I see a client scope's mappers for one protocol?”
Tell an agent
List protocol mappers on client scope {client_scope} in realm {realm} for {protocol}.
Show the mappers of scope {client_scope} for protocol {protocol}.
POST /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/add-models Create several mappers on a client template · Create multiple mappers #
Ask an LLM
“How do I bulk-add protocol mappers to a client template?”
“Can I add many mappers to a client template at once?”
Tell an agent
Create multiple mappers on client template {client_scope_id} in realm {realm}.
Bulk-add these protocol mapper models to client template {client_scope_id} of {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models List mappers on a client template · Get mappers #
Ask an LLM
“What protocol mappers are defined on a client template?”
“Can I see all mappers on a client template?”
Tell an agent
List the mappers on client template {client_scope_id} in realm {realm}.
Show every protocol mapper defined on client template {client_scope_id} of {realm}.
POST /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models Create a mapper on a client template · Create a mapper #
Ask an LLM
“How do I add a single protocol mapper to a client template?”
“Can I set consent text when adding a mapper to a client template?”
Tell an agent
Create a {protocol_mapper} mapper named {name} on client template {client_scope_id} in {realm}.
Add a new protocol mapper {name} to client template {client_scope_id} of {realm} with config {config}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id} Get a mapper on a client template · Get mapper by id #
Ask an LLM
“How do I read one protocol mapper from a client template?”
“What config does a specific mapper on a client template have?”
Tell an agent
Get mapper {id} on client template {client_scope_id} in realm {realm}.
Show the settings of protocol mapper {id} attached to client template {client_scope_id} of {realm}.
PUT /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id} Update a mapper on a client template · Update the mapper #
Ask an LLM
“How do I change the config of a mapper on a client template?”
“Can I rename a protocol mapper attached to a client template?”
Tell an agent
Update mapper {id} on client template {client_scope_id} in realm {realm}.
Change the config of existing mapper {id} on client template {client_scope_id} of {realm} to {config}.
DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id} Delete a mapper from a client template · Delete the mapper #
Ask an LLM
“How do I remove a protocol mapper from a client template?”
“Can I delete one mapper from a client template by id?”
Tell an agent destructive · confirm first
Delete mapper {id} from client template {client_scope_id} in realm {realm}.
Remove protocol mapper {id} from client template {client_scope_id} of {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/protocol/{protocol} List a client template's protocol mappers · Get mappers by name for a specific protocol #
Ask an LLM
“Which mappers appear on a client template for a protocol?”
“Can I list a client template's protocol mappers?”
Tell an agent
List protocol mappers on client template {client_scope} in realm {realm} for {protocol}.
Show the mappers of template {client_scope} for protocol {protocol}.
POST /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/add-models Create several mappers on a client at once · Create multiple mappers #
Ask an LLM
“Can I create many protocol mappers on a single client in one call?”
“Is there a bulk add of mappers for a client?”
Tell an agent
Create these mappers on client {client} in realm {realm} in one request.
Bulk-add the mappers to client {client}.
GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models List the protocol mappers on a client · Get mappers #
Ask an LLM
“What protocol mappers has a particular client got?”
“Which mappers are attached to a client?”
Tell an agent
List all protocol mappers on client {client} in realm {realm}.
Show every mapper attached to client {client}.
POST /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models Create a protocol mapper on a client · Create a mapper #
Ask an LLM
“How do I map an external claim onto a Keycloak user attribute?”
“Can I add a single mapper to a client with a type and config?”
Tell an agent
Create a {protocol} mapper {name} on client {client} in realm {realm} using {mapper_type}.
Add a mapper to client {client}: {name}, type {mapper_type}, config {config}.
GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id} Get one protocol mapper on a client · Get mapper by id #
Ask an LLM
“What type and config does a specific client mapper have?”
“Can I fetch a single per-client protocol mapper?”
Tell an agent
Get protocol mapper {id} on client {client} in realm {realm}.
Show the details of mapper {id} on client {client}.
PUT /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id} Update a client protocol mapper · Update the mapper #
Ask an LLM
“Can I change the config of a client mapper after it's created?”
“How do I rename a per-client protocol mapper?”
Tell an agent
Update protocol mapper {id} on client {client} in realm {realm} with new config {config}.
Rename per-client mapper {id} on client {client} in realm {realm} to {name}.
DELETE /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id} Delete a client protocol mapper · Delete the mapper #
Ask an LLM
“Can I remove a mapper from a client?”
“What happens to claims when a client-level mapper is deleted?”
Tell an agent destructive · confirm first
Delete protocol mapper {id} from client {client} in realm {realm}.
Remove per-client mapper {id} on client {client}.
GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/protocol/{protocol} List a client's mappers for one protocol · Get mappers by name for a specific protocol #
Ask an LLM
“Which mappers on a specific client apply to just one protocol like openid-connect or saml?”
“Can I filter a client's own protocol mappers down to a single protocol?”
Tell an agent
Show the {protocol} mappers directly on client {client} in realm {realm}.
Get only the {protocol} protocol mappers for client UUID {client} in {realm}.

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-protocol-mappers-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

keycloak-protocol-mappers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Protocol Mappers API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:
- name: Protocol Mappers
paths:
  /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/add-models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Protocol Mappers
      summary: Create multiple mappers
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersAddModels
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersModels
      x-operation-id-source: derived
    post:
      tags:
      - Protocol Mappers
      summary: Create a mapper
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '201':
          description: Created
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersModels
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mapper by id
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
    put:
      tags:
      - Protocol Mappers
      summary: Update the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: putAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
    delete:
      tags:
      - Protocol Mappers
      summary: Delete the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/protocol/{protocol}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers by name for a specific protocol
      parameters:
      - name: protocol
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdProtocolMappersProtocolByProtocol
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/add-models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Protocol Mappers
      summary: Create multiple mappers
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersAddModels
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersModels
      x-operation-id-source: derived
    post:
      tags:
      - Protocol Mappers
      summary: Create a mapper
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '201':
          description: Created
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersModels
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mapper by id
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
    put:
      tags:
      - Protocol Mappers
      summary: Update the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: putAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
    delete:
      tags:
      - Protocol Mappers
      summary: Delete the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersModelsById
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/protocol/{protocol}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-scope-id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers by name for a specific protocol
      parameters:
      - name: protocol
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdProtocolMappersProtocolByProtocol
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/add-models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-uuid
      in: path
      description: id of client (not client-id!)
      required: true
      schema:
        type: string
    post:
      tags:
      - Protocol Mappers
      summary: Create multiple mappers
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientsByClientUuidProtocolMappersAddModels
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-uuid
      in: path
      description: id of client (not client-id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidProtocolMappersModels
      x-operation-id-source: derived
    post:
      tags:
      - Protocol Mappers
      summary: Create a mapper
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '201':
          description: Created
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmClientsByClientUuidProtocolMappersModels
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-uuid
      in: path
      description: id of client (not client-id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mapper by id
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidProtocolMappersModelsById
      x-operation-id-source: derived
    put:
      tags:
      - Protocol Mappers
      summary: Update the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProtocolMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: putAdminRealmsByRealmClientsByClientUuidProtocolMappersModelsById
      x-operation-id-source: derived
    delete:
      tags:
      - Protocol Mappers
      summary: Delete the mapper
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientsByClientUuidProtocolMappersModelsById
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/protocol/{protocol}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: client-uuid
      in: path
      description: id of client (not client-id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Protocol Mappers
      summary: Get mappers by name for a specific protocol
      parameters:
      - name: protocol
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProtocolMapperRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidProtocolMappersProtocolByProtocol
      x-operation-id-source: derived
components:
  schemas:
    ProtocolMapperRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        protocol:
          type: string
        protocolMapper:
          type: string
        consentRequired:
          type: boolean
          deprecated: true
        consentText:
          type: string
          deprecated: true
        config:
          type: object
          additionalProperties:
            type: string