Keycloak Scope Mappings API

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

Operations 33

GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings Get all scope mappings for the client #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} Get the roles associated with a client's scope Returns roles for the client #
POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} Add client-level roles to the client's scope #
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client} Remove client-level roles from the client's scope #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/available The available client-level roles Returns the roles for the client that can be… #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/composite Get effective client roles Returns the roles for the client that are associated… #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm Get realm-level roles associated with the client's scope #
POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm Add a set of realm-level roles to the client's scope #
DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm Remove a set of realm-level roles from the client's scope #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/available Get realm-level roles that are available to attach to this client's scope #
GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/composite Get effective realm-level roles associated with the client’s scope What this… #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings Get all scope mappings for the client #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} Get the roles associated with a client's scope Returns roles for the client #
POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} Add client-level roles to the client's scope #
DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client} Remove client-level roles from the client's scope #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/available The available client-level roles Returns the roles for the client that can be… #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/composite Get effective client roles Returns the roles for the client that are associated… #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm Get realm-level roles associated with the client's scope #
POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm Add a set of realm-level roles to the client's scope #
DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm Remove a set of realm-level roles from the client's scope #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/available Get realm-level roles that are available to attach to this client's scope #
GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/composite Get effective realm-level roles associated with the client’s scope What this… #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings Get all scope mappings for the client #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Get the roles associated with a client's scope Returns roles for the client #
POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Add client-level roles to the client's scope #
DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client} Remove client-level roles from the client's scope #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/available The available client-level roles Returns the roles for the client that can be… #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/composite Get effective client roles Returns the roles for the client that are associated… #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm Get realm-level roles associated with the client's scope #
POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm Add a set of realm-level roles to the client's scope #
DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm Remove a set of realm-level roles from the client's scope #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/available Get realm-level roles that are available to attach to this client's scope #
GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/composite Get effective realm-level roles associated with the client’s scope What this… #

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. 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
    MappingsRepresentation:
      type: object
      properties:
        realmMappings:
          type: array
          items:
            $ref: '#/components/schemas/RoleRepresentation'
        clientMappings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ClientMappingsRepresentation'
    ClientMappingsRepresentation:
      type: object
      properties:
        id:
          type: string
        client:
          type: string
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/RoleRepresentation'