Project

General

Profile

Actions

user_create

Creates a new user.

Request

Endpoint

POST /users

Body:

{
  "realm": "vendors",
  "username": "rahuld",
  "email": "rahul@example.com",
  "firstName": "Rahul",
  "lastName": "Deshpande",
  "enabled": true
}
  • realm (string): Name of the realm for new user creation.
  • username: string, required. Username for the user.
  • email: string, required. User's email address.
  • firstName: string, optional. User's first name.
  • lastName: string, optional. User's last name.
  • enabled: boolean, required. Indicates if user account is enabled.

Response

{
  "id": "df84nsd....",
  "username": "rahuld",
  "email": "rahul@example.com",
  "firstName": "Rahul",
  "lastName": "Deshpande",
  "enabled": true
}
  • id: string, required. Unique user ID.
  • username: string, required. Username for the user.
  • email: string, optional. User's email address.
  • firstName: string, optional. User's first name.
  • lastName: string, optional. User's last name.
  • enabled: boolean, required. Indicates if user account is enabled.

Errors

  • REALM_NOT_FOUND: Specified realm does not exist.
  • USERNAME_EXISTS: User with provided username already exists in the realm.

user_get

The user_get call retrieves the details of a specific user in a specific realm. It returns the complete user definition in JSON format.

Request

Endpoint:

GET /user

URL Parameters:

  • id (string): The unique ID of the user.
  • name (string): User name
  • realm (string): Realm to use for retrieving the user. This is a mandatory parameter.

realm is mandatory. One of id or name must be present.

No request body required.

Response

Body:

{
  "id": "df84nsd...",
  "username": "rahuld",
  "email": "rahul@example.com",
  "firstName": "Rahul",
  "lastName": "Deshpande",
  "emailVerified": true,
  "enabled": true,
  "attributes": {
    "vendor": true
  }
}

  • id: string, required. The unique ID of the user.
  • username: string, required. The username for the user.
  • email: string, optional. The user's email address.
  • firstName: string, optional. The user's first name.
  • lastName: string, optional. The user's last name.
  • emailVerified: boolean, optional. A flag indicating whether the user's email address has been verified.
  • enabled: boolean, required. A flag indicating whether the user account is enabled.
  • attributes: object, optional. A map of additional attributes for the user.

Errors

  • USER_NOT_FOUND: The specified user does not exist in the realm.
  • USERNAME_EXISTS: User with provided username already exists in the realm.

Updated by Sachin Divekar over 1 year ago ยท 5 revisions