Skip to content

Create or update a realm

PUT
/auth/realms/{name}
curl --request PUT \
--url https://sylve.lan:8181/api/auth/realms/example \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "acrValues": "example", "autoCreate": true, "caCert": "example", "clientId": "example", "clientSecret": "example", "default": true, "enabled": true, "groupMappings": [ { "claim": "example", "group": "example" } ], "groupsClaim": "example", "hasSecret": true, "hostedDomains": "example", "id": 1, "issuer": "example", "label": "example", "name": "example", "prompt": "example", "queryUserInfo": true, "scopes": "example", "sessionHours": 1, "usernameClaim": "example" }'

Issuer and client ID are fixed once a realm exists; a missing clientSecret keeps the stored one

name
required
string

Realm name

Realm

Media typeapplication/json
object
acrValues
string
autoCreate
boolean
caCert
string
clientId
string
clientSecret
string
default
boolean
enabled
boolean
groupMappings
Array<object>
object
claim
string
group
string
groupsClaim
string
hasSecret
boolean
hostedDomains
string
id
integer
issuer
string
label
string
name
string
prompt
string
queryUserInfo
boolean
scopes
string
sessionHours
integer
usernameClaim
string
Examplegenerated
{
"acrValues": "example",
"autoCreate": true,
"caCert": "example",
"clientId": "example",
"clientSecret": "example",
"default": true,
"enabled": true,
"groupMappings": [
{
"claim": "example",
"group": "example"
}
],
"groupsClaim": "example",
"hasSecret": true,
"hostedDomains": "example",
"id": 1,
"issuer": "example",
"label": "example",
"name": "example",
"prompt": "example",
"queryUserInfo": true,
"scopes": "example",
"sessionHours": 1,
"usernameClaim": "example"
}

Realm Set

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Bad Request

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Forbidden

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Service Unavailable

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}