Skip to main content

POST /userAccounts

Use this method to create a user account.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/userAccounts

Query parameters

None

Request body

AttributesRequired / OptionalTypeDescription
userNameRequiredStringUser name
userPwRequiredStringInitial account password
descriptionOptionalStringDescription for the user account
groupsRequiredArray of stringsList of role groups to which this user account belongs. This can be one of the following values.
  • LXC-SUPERVISOR. Includes the lxc-supervisor role.

  • LXC-ADMIN. Includes the lxca-admin role.

  • LXC-SECURITY-ADMIN. Includes the lxc-security-admin role.

  • LXC-HW-ADMIN. Includes the lxc-hw-admin role.

  • LXC-FW-ADMIN. Includes the lxc-fw-admin role.

  • LXC-OS-ADMIN. Includes the lxc-os-admin role.

  • LXC-SERVICE-ADMIN. Includes the lxc-service-admin role.

  • LXC-HW-MANAGER. Includes the lxc-hw-manager role.

  • LXC-OPERATOR. Includes the lxc-operator role.

  • LXC-RECOVERY. Includes the lxc-recovery role.

PasswordChangeFirstAccessOptionalBooleanIndicates if the password must be changed when the user initially accesses the XClarity Administrator. This can be one of the following values.
  • true. The password must be changed.
  • false. The password does not have to be changed.

If not specified, the default value is taken from the user account settings (see /userAccountSettings).

Request example

{
"userPw": "passw0rd",
"userName": "test2",
"description": "test2 description",
"groups": ["lxc-admin"],
"PasswordChangeFirstAccess": true
}

Response codes

CodeDescriptionComments
201CreatedOne or more new resources were successfully created.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
responseArrayEach array element represents a user account
 activeSessionsIntegerNumber of currently active sessions for the user account
 createTimestampStringDate and time when the account was created. The timestamp is returned in ISO 8601 forma (for example, 2014-02-05T15:54:13Z).
 descriptionStringDescription for the user account
 fullNameStringDescriptive name of the user account (for example: First M Last)
 groupsArray of stringsList of role groups to which the user account belongs
 idStringHashed index uniquely identifying a user account
 lastLoginTimestampStringDate and time when the account was last successfully logged in. he timestamp is returned in ISO 8601 format (for example, 2014-02-05T15:54:13Z).
 ldapDnStringUser's LDAP distinguished name (for example, "cn=USERID,ou=Users,dc=ibmbase,dc=com").
 loginAttemptsIntegerNumber of times that the user has attempted to log in
 loginCountIntegerNumber of times the user has successfully logged in
 modifyTimestampStringDate and time when the account was last modified. The timestamp is returned in ISO 8601 format (for example, 2014-02-05T15:54:13Z).
 PasswordChangeFirstAccessBooleanIndicates if the user is required to change the password on the initial access. This can be one of the following values.
  • true. The password must be changed.
  • false. The password does not have to be changed.
 pwdAgeIntegerNumber of days that have elapsed since the password was last changed
 pwExpirationWarningBooleanIndicates if a password expiration warning is to be displayed when a user logs in. This can be one of following values.
  • true. The password warning is to be displayed.
  • false. The password has not expired.
 pwExpiredBooleanIndicates if the password has expired. This can be one of the following values.
  • true. The password has expired.
  • false. The password has not expired.
 reservedBooleanIndicates whether the user account is reserved for use by the XClarity Administrator. This can be one of the following values.
  • true. The user account is reserved.
  • false. The user account is not reserved.
 stateStringUser-account status. This can be one of the following values.
  • Active. The user account is in an active state.
  • Inactive. The user account is in an inactive state (disabled).
  • Locked. The user account is locked
 timeBeforeExpirationInDaysIntegerNumber of days remaining before a password expires
 userNameStringName of the user account
 userPwStringInternal use only
resultStringRequest results. This can be one of the following values.
  • success. The request completed successfully.
  • failure. The request failed. A descriptive error message was returned.
messagesArray of objectsInformation about one or more messages
 explanationStringAdditional information to clarify the reason for the message
 idStringMessage identifier of a returned message
 recoveryArray of objectsRecovery information
  textStringUser actions that can be taken to recover from the event
  URLStringLink to the help system for more information, if available
 textStringMessage text associated with the message identifier
The following example is returned if the request is successful.
{
"response": {
"createTimestamp": "2015-01-05T22:28:28Z",
"description": "test2 description",
"groups": ["lxc-admin"],
"id": "478e6564-066a-4714-b734-e0f5c3073fbf",
"lastLoginTimestamp": "",
"ldapDn": "cn=TEST2,ou=Users,dc=ibmbase,dc=com",
"loginAttempts": 0,
"loginCount": 0,
"modifyTimestamp": "2015-01-05T22:28:28Z",
"PasswordChangeFirstAccess": true,
"pwdAge": 0,
"pwExpirationWarning": false,
"pwExpired": true,
"state": "Active",
"timeBeforeExpirationInDays": 90,
"userName": "TEST2",
"userPw": "NA"
},
"result": "success",
"messages": [{
"explanation": "",
"id": "FQXHMSE0001I",
"recovery": {
"text": "Information only; no action is required.",
"URL": ""
},
"text": "The request completed successfully."
}]
}