Keycloak Scope Mappings API

The Scope Mappings API from Keycloak — 21 operation(s) for scope mappings.

GitHub OpenAPI

Operations 33

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/{client-scope-id}/scope-mappings List a client scope's scope mappings · Get all scope mappings for the client #
Ask an LLM
“Which roles and scopes are mapped to a client scope?”
“Can I see the full scope mapping for a client scope?”
Tell an agent
List scope mappings for client scope {client_scope_id} in realm {realm}.
Show every mapped role on client scope {client_scope_id}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} List a client's mapped roles for a client scope · Get the roles associated with a client's scope Returns roles for the client #
Ask an LLM
“Which roles are mapped to a client through a client scope?”
“What roles does a client get from a client scope?”
Tell an agent
List roles mapped to client {client} through client scope {client_scope_id} in realm {realm}.
Show the mapped roles on client {client} for client scope {client_scope_id}.
POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} Add client-level roles to a client scope · Add client-level roles to the client's scope #
Ask an LLM
“How do I add roles to a client scope for a client?”
“Can I attach client-level roles to a client scope?”
Tell an agent
Add roles to client {client} through client scope {client_scope_id} in realm {realm}.
Attach client-level roles to client scope {client_scope_id}.
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} Remove client-level roles from a client scope · Remove client-level roles from the client's scope #
Ask an LLM
“How do I remove roles from a client scope for a client?”
“Can I detach client-level roles from a client scope?”
Tell an agent destructive · confirm first
Remove roles from client {client} through client scope {client_scope_id} in realm {realm}.
Detach client-level roles from client scope {client_scope_id}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/available List roles available to a client on a client scope · The available client-level roles Returns the roles for the client that can be… #
Ask an LLM
“Which roles can I attach to a client through a client scope?”
“What roles are available to a client on a client scope?”
Tell an agent
List roles available to client {client} on client scope {client_scope_id} in realm {realm}.
Show roles I can attach to client {client} through client scope {client_scope_id}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/composite Get effective roles a client gets from a client scope · Get effective client roles Returns the roles for the client that are associated… #
Ask an LLM
“What roles does a client actually get from a client scope, including composites?”
“Can I get a brief or full composite view of a client's client scope roles?”
Tell an agent
Get effective roles for client {client} from client scope {client_scope_id} in realm {realm}.
Show composite roles for client {client} on client scope {client_scope_id} with brief {brief}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm List realm-level roles on a client scope · Get realm-level roles associated with the client's scope #
Ask an LLM
“Which realm roles are mapped to a client scope?”
“Can I see the realm-level roles on a client scope?”
Tell an agent
List realm-level roles mapped to client scope {client_scope_id} in realm {realm}.
Show realm roles on client scope {client_scope_id}.
POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm Add realm roles to a client scope · Add a set of realm-level roles to the client's scope #
Ask an LLM
“How do I let a client scope include realm-level roles in its scope mappings?”
“Can I map extra realm roles onto an existing client scope?”
Tell an agent
Map realm roles onto client scope {scope_id} in realm {realm}.
Extend the scope {scope_id} in {realm} with more realm-level roles.
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm Remove realm roles from a client scope · Remove a set of realm-level roles from the client's scope #
Ask an LLM
“How do I unmap realm roles from a client scope?”
“Can I drop realm-level roles from a client scope's mappings?”
Tell an agent destructive · confirm first
Unmap realm roles from client scope {scope_id} in realm {realm}.
Delete the realm-level role mappings of scope {scope_id} in {realm}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/available List realm roles available to a client scope · Get realm-level roles that are available to attach to this client's scope #
Ask an LLM
“Which realm roles are still unmapped on a client scope?”
“What realm roles could I still add to a client scope?”
Tell an agent
List the realm roles still addable to client scope {scope_id} in {realm}.
Find unmapped realm roles for scope {scope_id} in realm {realm}.
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/composite List effective realm roles of a client scope · Get effective realm-level roles associated with the client’s scope What this… #
Ask an LLM
“What is the full effective list of realm roles on a client template's scope?”
“Which realm roles does a client template's scope include, according to the scope mappings?”
Tell an agent
Get the effective realm roles of client scope {client_scope_id} in realm {realm}.
List every realm-level role a client template scope {client_scope_id} holds ({brief} representation).
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings List scope mappings of a client template · Get all scope mappings for the client #
Ask an LLM
“How do I see the full scope mappings for a client template?”
“Where are client-level roles attached on a client template?”
Tell an agent
Get all scope mappings for client template {client_scope_id} in realm {realm}.
Show the client-level role mappings on client template {client_scope_id} in {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} List a client's roles mapped on a client template · Get the roles associated with a client's scope Returns roles for the client #
Ask an LLM
“Which roles does a specific client contribute to a client template's scope?”
“What client roles are mapped for one client under a template?”
Tell an agent
Get roles of client {client} mapped under template {template_id} in realm {realm}.
Fetch the mappings of client {client} beneath template {template_id} in {realm}.
POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} Add client-level roles to a client template client · Add client-level roles to the client's scope #
Ask an LLM
“Can I attach client roles to one client through a client template?”
“How do I add roles to a specific client's scope on a client template?”
Tell an agent
Add client-level roles to client {client} on client template {client_scope_id} in realm {realm}.
Grant client {client} on client template {client_scope_id} the roles via the client template in {realm}.
DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} Remove client-level roles from a client template client · Remove client-level roles from the client's scope #
Ask an LLM
“How do I remove client roles from a single client on a client template?”
“Can I revoke a client's role grant through a client template?”
Tell an agent destructive · confirm first
Remove client-level roles from client {client} on client template {client_scope_id} in realm {realm}.
Revoke client {client} on client template {client_scope_id} of the roles granted by the template in {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/available List client roles available to a client template client · The available client-level roles Returns the roles for the client that can be… #
Ask an LLM
“Which client-level roles can I attach to a client through a client template?”
“Is a role available before adding it to a client's scope on a template?”
Tell an agent
List client roles available to client {client} on client template {client_scope_id} in realm {realm}.
Show which client-level roles I could grant client {client} on template {client_scope_id} in {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/composite Get effective roles of a client under a template · Get effective client roles Returns the roles for the client that are associated… #
Ask an LLM
“What effective roles does a client give a template, with attributes if I want them?”
“Can I see composite-expanded roles of one client under a client template?”
Tell an agent
Show effective roles of client {client} under template {template_id} in {realm}.
Fetch effective roles of client {client} under template {template_id} in {realm} with briefRepresentation set to {brief}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm List realm roles mapped on a client template · Get realm-level roles associated with the client's scope #
Ask an LLM
“Which realm-level roles does a template currently carry in its scope?”
“What realm roles has a client template been given?”
Tell an agent
Fetch realm-level roles mapped on template {template_id} in realm {realm}.
Show which realm roles template {template_id} carries in {realm}.
POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm Add realm roles to a client template · Add a set of realm-level roles to the client's scope #
Ask an LLM
“How do I attach realm roles to a legacy client template?”
“Can I give a client template additional realm-level roles?”
Tell an agent
Attach realm roles to client template {template_id} in realm {realm}.
Add realm-level roles to template {template_id} of {realm}.
DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm Remove realm roles from a client template · Remove a set of realm-level roles from the client's scope #
Ask an LLM
“How can I strip realm roles from a client template?”
“Is it possible to unmap realm roles from a template's scope?”
Tell an agent destructive · confirm first
Strip realm roles from client template {template_id} in realm {realm}.
Unmap realm-level roles from template {template_id} in {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/available List realm roles available to a client template · Get realm-level roles that are available to attach to this client's scope #
Ask an LLM
“Which realm roles are still free to add to a client template?”
“What realm roles can a client template still pick up?”
Tell an agent
List addable realm roles for client template {template_id} in {realm}.
Find realm roles not yet mapped on template {template_id} in realm {realm}.
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/composite Get effective realm roles for a client template scope · Get effective realm-level roles associated with the client’s scope What this… #
Ask an LLM
“What realm roles does a client template's scope actually grant?”
“Can I see the full effective realm role set for a client template scope?”
Tell an agent
Show the effective realm roles for client template scope {client_scope_id} in {realm}.
Get the full realm role set of client template {client_scope_id} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings List all scope mappings for a client · Get all scope mappings for the client #
Ask an LLM
“Which realm and client roles are mapped on a client?”
“What scope mappings exist for a client?”
Tell an agent
List all scope mappings for client {client_uuid} in {realm}.
Show every role mapping on client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Get client-level roles mapped on a client · Get the roles associated with a client's scope Returns roles for the client #
Ask an LLM
“Which client-level roles are mapped on a client?”
“What roles does a client's scope grant for another client?”
Tell an agent
Get client-level roles mapped on client {client_uuid} in {realm} for client {client}.
Show the roles client {client} grants to client {client_uuid} in {realm}.
POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Add client-level roles to a client's scope · Add client-level roles to the client's scope #
Ask an LLM
“How do I grant another client-level roles through a client's scope?”
“Can I add client roles to a client's scope mapping?”
Tell an agent
Add client-level roles to client {client_uuid} in {realm} for client {client}.
Grant client {client} roles on client {client_uuid} in {realm}.
DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Remove client-level roles from a client's scope · Remove client-level roles from the client's scope #
Ask an LLM
“How do I revoke a client-level role from a client's scope?”
“Can I remove client roles mapped on a client?”
Tell an agent destructive · confirm first
Remove client-level roles from client {client_uuid} in {realm} for client {client}.
Revoke client {client} roles on client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/available List another client's roles available to a client · The available client-level roles Returns the roles for the client that can be… #
Ask an LLM
“Which roles of another client can I still add to this client's scope?”
“What roles from a second client are available for a given client to receive?”
Tell an agent
List roles of client {client} that can still be granted to client {client_uuid} in realm {realm}.
Show grantable roles from client {client} for client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/composite Get effective client roles for a client · Get effective client roles Returns the roles for the client that are associated… #
Ask an LLM
“What client roles does a client actually get?”
“Can I see the full effective client role set for a client?”
Tell an agent
Show the effective client roles for client {client} on client {client_uuid} in {realm}.
Get the full client role set of client {client} on client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm List realm roles in a client's scope · Get realm-level roles associated with the client's scope #
Ask an LLM
“What realm roles has a client been given in its own scope mappings?”
“Which realm-level roles sit directly on one client?”
Tell an agent
Get realm roles mapped on client {client_uuid} in realm {realm}.
Show the realm-level roles directly on client {client_uuid} in {realm}.
POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm Add realm roles to a client · Add a set of realm-level roles to the client's scope #
Ask an LLM
“How do I add realm roles to a client's own scope mappings?”
“Can I attach realm-level roles directly to one client?”
Tell an agent
Add realm roles to client {client_uuid} in realm {realm}.
Directly grant client {client_uuid} in {realm} realm-level roles.
DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm Remove realm roles from a client · Remove a set of realm-level roles from the client's scope #
Ask an LLM
“Can I detach realm roles from one client's own scope?”
“What removes realm-level scope mappings from a client?”
Tell an agent destructive · confirm first
Remove realm roles from client {client_uuid} in realm {realm}.
Detach realm-level roles from client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/available List realm roles available to a client · Get realm-level roles that are available to attach to this client's scope #
Ask an LLM
“Which realm roles can still be added directly to a client?”
“What realm roles has a client not been given yet?”
Tell an agent
List realm roles addable to client {client_uuid} in realm {realm}.
Find realm roles not yet in the scope of client {client_uuid} in {realm}.
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/composite Get effective realm roles of a client's scope · Get effective realm-level roles associated with the client’s scope What this… #
Ask an LLM
“What is the complete effective realm role view for a client?”
“Can I get a total picture of realm roles tied to a client, with attributes?”
Tell an agent
Get effective realm roles for client {client_uuid} in realm {realm}.
Show total realm-level roles on client {client_uuid} in {realm} with briefRepresentation {brief}.

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-scope-mappings-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-scope-mappings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Scope Mappings API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:
- name: Scope Mappings
paths:
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings:
    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:
      - Scope Mappings
      summary: Get all scope mappings for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingsRepresentation'
      deprecated: true
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappings
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get the roles associated with a client's scope Returns roles for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add client-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove client-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/available:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: The available client-level roles Returns the roles for the client that can be…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsClientsByClientAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/composite:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get effective client roles Returns the roles for the client that are associated…
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsClientsByClientComposite
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm:
    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:
      - Scope Mappings
      summary: Get realm-level roles associated with the client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add a set of realm-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove a set of realm-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/available:
    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:
      - Scope Mappings
      summary: Get realm-level roles that are available to attach to this client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsRealmAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/composite:
    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:
      - Scope Mappings
      summary: Get effective realm-level roles associated with the client’s scope What this…
      description: The method is really to show a comprehensive total view of realm-level roles associated with the client.
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientScopesByClientScopeIdScopeMappingsRealmComposite
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings:
    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:
      - Scope Mappings
      summary: Get all scope mappings for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingsRepresentation'
      deprecated: true
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappings
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get the roles associated with a client's scope Returns roles for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add client-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove client-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsClientsByClient
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/available:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: The available client-level roles Returns the roles for the client that can be…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsClientsByClientAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/composite:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get effective client roles Returns the roles for the client that are associated…
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsClientsByClientComposite
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm:
    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:
      - Scope Mappings
      summary: Get realm-level roles associated with the client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add a set of realm-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove a set of realm-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsRealm
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/available:
    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:
      - Scope Mappings
      summary: Get realm-level roles that are available to attach to this client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsRealmAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/composite:
    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:
      - Scope Mappings
      summary: Get effective realm-level roles associated with the client’s scope What this…
      description: The method is really to show a comprehensive total view of realm-level roles associated with the client.
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientTemplatesByClientScopeIdScopeMappingsRealmComposite
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings:
    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:
      - Scope Mappings
      summary: Get all scope mappings for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingsRepresentation'
      deprecated: true
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappings
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get the roles associated with a client's scope Returns roles for the client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsClientsByClient
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add client-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientsByClientUuidScopeMappingsClientsByClient
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove client-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientsByClientUuidScopeMappingsClientsByClient
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/available:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: The available client-level roles Returns the roles for the client that can be…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsClientsByClientAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/composite:
    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
    - name: client
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Scope Mappings
      summary: Get effective client roles Returns the roles for the client that are associated…
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsClientsByClientComposite
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm:
    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:
      - Scope Mappings
      summary: Get realm-level roles associated with the client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsRealm
      x-operation-id-source: derived
    post:
      tags:
      - Scope Mappings
      summary: Add a set of realm-level roles to the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: postAdminRealmsByRealmClientsByClientUuidScopeMappingsRealm
      x-operation-id-source: derived
    delete:
      tags:
      - Scope Mappings
      summary: Remove a set of realm-level roles from the client's scope
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RoleRepresentation'
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmClientsByClientUuidScopeMappingsRealm
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/available:
    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:
      - Scope Mappings
      summary: Get realm-level roles that are available to attach to this client's scope
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsRealmAvailable
      x-operation-id-source: derived
  /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/composite:
    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:
      - Scope Mappings
      summary: Get effective realm-level roles associated with the client’s scope What this…
      description: The method is really to show a comprehensive total view of realm-level roles associated with the client.
      parameters:
      - name: briefRepresentation
        in: query
        description: if false, return roles with their attributes
        schema:
          default: true
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRepresentation'
      operationId: getAdminRealmsByRealmClientsByClientUuidScopeMappingsRealmComposite
      x-operation-id-source: derived
components:
  schemas:
    RoleRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        scopeParamRequired:
          type: boolean
          deprecated: true
        composite:
          type: boolean
        composites:
          $ref: '#/components/schemas/Composites'
        clientRole:
          type: boolean
        containerId:
          type: string
        attributes:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    Composites:
      type: object
      properties:
        realm:
          uniqueItems: true
          type: array
          items:
            type: string
        client:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        application:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          deprecated: true
    ClientMappingsRepresentation:
      type: object
      properties:
        id:
          type: string
        client:
          type: string
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/RoleRepresentation'
    MappingsRepresentation:
      type: object
      properties:
        realmMappings:
          type: array
          items:
            $ref: '#/components/schemas/RoleRepresentation'
        clientMappings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ClientMappingsRepresentation'