Overview
Realms provide multi-tenancy isolation in QAuth. Each realm maintains its own set of users, roles, and clients. This endpoint creates a new realm with a unique identifier and display name.
Request Body
Unique realm identifier. Used as the primary key for realm lookups.
Human-readable display name for the realm.
Response
Returns the created realm object:
The unique realm identifier.
The display name of the realm.
Example
curl -X POST http://localhost:8080/v1/auth/realms \
-H 'Content-Type: application/json' \
-d '{
"id": "acme",
"name": "Acme Corporation"
}'
{
"id": "acme",
"name": "Acme Corporation"
}
Error Responses
Human-readable error message when the request fails.
Common errors:
- 400 Bad Request: Invalid request format or missing required fields
- 500 Internal Server Error: Realm creation failed due to internal error