Keycloak Client Scopes API

The Client Scopes API from Keycloak — 4 operation(s) for client scopes.

GitHub OpenAPI

Operations 10

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

GET /admin/realms/{realm}/client-scopes List realm client scopes · Get client scopes belonging to the realm Returns a list of client scopes… #
Ask an LLM
“Which client scopes are defined in my realm?”
“Can I see all the client scopes a realm offers?”
Tell an agent
List client scopes in realm {realm}.
Show every client scope defined for {realm}.
POST /admin/realms/{realm}/client-scopes Create a realm client scope · Create a new client scope Client Scope’s name must be unique! #
Ask an LLM
“How do I define a new client scope in a realm?”
“Can a realm client scope be created for a specific protocol?”
Tell an agent
Create a client scope named {name} in realm {realm}.
Add a realm client scope {name} for protocol {protocol} in {realm}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id} Get a realm client scope · Get representation of the client scope #
Ask an LLM
“What protocol and mappers does a realm client scope have?”
“Can I read one client scope by its ID?”
Tell an agent
Get client scope {client-scope-id} in realm {realm}.
Show the protocol mappers on realm client scope {client-scope-id}.
PUT /admin/realms/{realm}/client-scopes/{client-scope-id} Update a realm client scope · Update the client scope #
Ask an LLM
“Can I change the protocol mappers on a realm client scope?”
“How do I rename a client scope in a realm?”
Tell an agent
Update client scope {client-scope-id} in realm {realm} to use protocol {protocol}.
Rename realm client scope {client-scope-id} to {name}.
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id} Delete a realm client scope · Delete the client scope #
Ask an LLM
“Can I remove a client scope from a realm?”
“What happens when a realm client scope is deleted?”
Tell an agent destructive · confirm first
Delete client scope {client-scope-id} from realm {realm}.
Remove realm client scope {client-scope-id}.
GET /admin/realms/{realm}/client-templates List client templates · Get client scopes belonging to the realm Returns a list of client scopes… #
Ask an LLM
“Which client templates are available for clients?”
“Can I list the client templates defined in a realm?”
Tell an agent
List client templates in realm {realm}.
Show every client template defined for {realm}.
POST /admin/realms/{realm}/client-templates Create a client template · Create a new client scope Client Scope’s name must be unique! #
Ask an LLM
“How do I define a reusable client template?”
“Can I create a client template with protocol mappers?”
Tell an agent
Create a client template named {name} in realm {realm}.
Add a client template {name} with mappers {protocolMappers} in {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id} Get a client template · Get representation of the client scope #
Ask an LLM
“What attributes and mappers does a client template have?”
“Can I read one client template by its ID?”
Tell an agent
Get client template {client-scope-id} in realm {realm}.
Show the attributes of client template {client-scope-id}.
PUT /admin/realms/{realm}/client-templates/{client-scope-id} Update a client template · Update the client scope #
Ask an LLM
“Can I change the protocol mappers on a client template?”
“How do I rename a client template?”
Tell an agent
Update client template {client-scope-id} in realm {realm} to use protocol {protocol}.
Rename client template {client-scope-id} to {name}.
DELETE /admin/realms/{realm}/client-templates/{client-scope-id} Delete a client template · Delete the client scope #
Ask an LLM
“Can I remove a client template?”
“What happens when a client template is deleted?”
Tell an agent destructive · confirm first
Delete client template {client-scope-id} from realm {realm}.
Remove client template {client-scope-id}.

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-client-scopes-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-client-scopes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Client Scopes API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:
- name: Client Scopes
paths:
  /admin/realms/{realm}/client-scopes:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Client Scopes
      summary: Get client scopes belonging to the realm Returns a list of client scopes…
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClientScopeRepresentation'
        '403':
          description: Forbidden
      operationId: getAdminRealmsByRealmClientScopes
      x-operation-id-source: derived
    post:
      tags:
      - Client Scopes
      summary: Create a new client scope Client Scope’s name must be unique!
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientScopeRepresentation'
      responses:
        '201':
          description: Created
        '403':
          description: Forbidden
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmClientScopes
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-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:
      - Client Scopes
      summary: Get representation of the client scope
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientScopeRepresentation'
        '403':
          description: Forbidden
      operationId: getAdminRealmsByRealmClientScopesByClientScopeId
      x-operation-id-source: derived
    put:
      tags:
      - Client Scopes
      summary: Update the client scope
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientScopeRepresentation'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '409':
          description: Conflict
      operationId: putAdminRealmsByRealmClientScopesByClientScopeId
      x-operation-id-source: derived
    delete:
      tags:
      - Client Scopes
      summary: Delete the client scope
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error
      operationId: deleteAdminRealmsByRealmClientScopesByClientScopeId
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Client Scopes
      summary: Get client scopes belonging to the realm Returns a list of client scopes…
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClientScopeRepresentation'
        '403':
          description: Forbidden
      operationId: getAdminRealmsByRealmClientTemplates
      x-operation-id-source: derived
    post:
      tags:
      - Client Scopes
      summary: Create a new client scope Client Scope’s name must be unique!
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientScopeRepresentation'
      responses:
        '201':
          description: Created
        '403':
          description: Forbidden
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmClientTemplates
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-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:
      - Client Scopes
      summary: Get representation of the client scope
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientScopeRepresentation'
        '403':
          description: Forbidden
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeId
      x-operation-id-source: derived
    put:
      tags:
      - Client Scopes
      summary: Update the client scope
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientScopeRepresentation'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '409':
          description: Conflict
      operationId: putAdminRealmsByRealmClientTemplatesByClientScopeId
      x-operation-id-source: derived
    delete:
      tags:
      - Client Scopes
      summary: Delete the client scope
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error
      operationId: deleteAdminRealmsByRealmClientTemplatesByClientScopeId
      x-operation-id-source: derived
components:
  schemas:
    ClientScopeRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        protocol:
          type: string
        attributes:
          type: object
          additionalProperties:
            type: string
        protocolMappers:
          type: array
          items:
            $ref: '#/components/schemas/ProtocolMapperRepresentation'
    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