Get a client role
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/clients/storefront/roles/admin';
const options = {
method: 'GET',
headers: {'API-Version': '2026-06-01.beta', 'API-Key': '<API-Key>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request GET \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/clients/storefront/roles/admin \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta'Returns a single role defined on the specified client.
Required scope: client-roles:read
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Example
customer-portalReference to a client in the realm: either its OAuth client_id or its internal Keycloak UUID. Both forms resolve to the same client.
Example
storefrontRole name.
Example
adminHeader Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The request has succeeded.
Public representation of a role defined on a single client.
object
Keycloak identifier of the role.
Human-friendly role description, when available.
Whether this role is composed from other roles.
OAuth client_id of the client the role belongs to.
Internal Keycloak UUID of the client the role belongs to.
Example
{
"id": "9a1f0f0e-1b2c-4d3e-8f5a-6b7c8d9e0f11",
"name": "invoices-read",
"description": "Read invoices",
"composite": false,
"client_id": "storefront",
"client_uuid": "3f4a1c2e-5b6d-4e7f-8a9b-0c1d2e3f4a5b"
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}