REST API extension - rwth-acis/keycloak-extensions GitHub Wiki

Definitions:

BasePath

All endpoints use the base path /auth/realms/{realm}/userClientAdministration

e.g. the base path for local Keycloak instance for the realm company: http://localhost:8080/auth/realms/company/userClientAdministration/

ClientResponse

Name Schema
adminToken string
clientRep ClientRepresentation

Resources

List user clients

GET /clients

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string

Responses

HTTP Code Description Schema
default success List<ClientRepresentation>
forbidden no Identity Cookie was send -

Produces

  • application/json

Request client representation

GET /client/{clientId}

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Path clientId
(required)
Client id of the requested client string

Responses

HTTP Code Description Schema
default success ClientResponse
forbidden no Identity Cookie was send or user not authorized to request the client
(user not linked to that client)
-

Produces

  • application/json

Create new client

POST /create

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Body clientRep
(required)
Representation of the new client with at least the client id given ClientRepresentation

Responses

HTTP Code Description Schema
default success -
forbidden no Identity Cookie was send -
conflict the client ID is already in use { "errorMessage": string }

Consumes

  • application/json

Change settings of linked client

POST /client/{intClientId}

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Path intClientId
(required)
internal id (not client id!) of the client string
Body clientRep
(required)
settings of the client that should be changed ClientRepresentation

Responses

HTTP Code Description Schema
default success ClientResponse
forbidden no Identity Cookie was send or user not authorized to change the client
(user not linked to that client)
-

Consumes

  • application/json

Produces

  • application/json

Delete client and linkage

DELETE /client/{intClientId}

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Path clientId
(required)
client id of the client that should be deleted string

Responses

HTTP Code Description Schema
default success -
forbidden no Identity Cookie was send or user not authorized to delete client
(user not linked to that client)
-

Create linkage between client and user

POST /access

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Body adminTokenInfo
(required)
administration token granting access to the client { "adminToken": string }

Responses

HTTP Code Description Schema
default success -
forbidden no Identity Cookie was send -
conflict invalid administration token { "errorMessage": string }

Consumes

  • application/json

Delete linkage between client and user

DELETE /access/{clientId}

Parameters

Type Name Description Schema
Cookie KEYCLOAK_IDENTITY
(required)
Keycloak Identity Cookie for authentication string
Path clientId
(required)
client id of the client that link should be deleted string

Responses

HTTP Code Description Schema
default success -
forbidden no Identity Cookie was send or user not authorized to delete linkage
(user not linked to that client)
-
⚠️ **GitHub.com Fallback** ⚠️