Skip to main content
Version: 2.2.2

Creating/updating users in SoftExpert Administration

info

This tutorial aims to provide a brief demonstration on how to create or update a user in SoftExpert Administration. It is not a thorough guide on integrations, but rather a practical illustration for request creation.

Introduction​

In order for a user to be able to log in to SoftExpert Suite, they must be registered in SoftExpert Administration with required information such as login, ID, name, department/position, and access group.

caution

In this example, we will cover the user method to create or update users, providing only the parameters required for the authentication.

This method allows inserting or editing:

  • General user data;
  • Departments and positions (ID # and name);
  • Relationship between user, department/position/team/access group;
  • Relationship between user and domain controller.

If the user exists already (with a previously created ID), their information will be updated and replaced with those present in the request. If value 1 is inserted in the UpdateType attribute, the attributes of the "List" type will be replaced with those present in the request. If no value or 0 is inserted, the values will be added to those already created in the system.

Resource URL​

POST /apigateway/v1/administration/user

Example​

Parameters that will be sent to the example request​

This section describes the parameters that must be sent to an example request in order for a user to be created in the system. The attributes include information such as user ID, name, login, password, language, activity status, e-mail address, access groups, department and position, as well as update type.

The table lists each necessary attribute, its type and description, in addition to specifying whether it is mandatory or not. A request example is provided in JSON format, showing how the attributes must be structured and sent in the request.

Attributes that will be set in this example:

Request Body ParameterTypeRequiredDescription
UserIdStringYesUser ID.
UserNameStringYesUser name.
UserLoginStringYesName the user is given in order to log in to the system.
UserPasswordStringYesUser password.
UserLanguageIntegerNoEnter the user language code, in accordance with the "Database encoding" column of the "Localization" section, in the System requirements document.
IsActiveIntegerNoEnabled user (1 - Enabled, 0 - Disabled).
IsEnabledIntegerNoBlocked user (1 - Blocked, 0 - Unblocked).
UserEmailStringYesUser e-mail address.
AccGroupIdArrayStringNoList of access group identifiers; separated by comma, if you want to add more than one.
DeptPosArray.DeptPos.DepartmentIDStringNoDepartment ID #.
DeptPosArray.DeptPos.DepartmentNameStringNoDepartment title.
DeptPosArray.DeptPos.PositionIDStringNoPosition ID #.
DeptPosArray.DeptPos.PositionNameStringNoDepartment title.
UpdateTypeIntegerNoDefinition of how the lists of values of the AccGroupIdArray, DeptPosArray and TeamIdArray parameters will be considered in user import.

Request example:

curl 'https://my-domain.softexpert.com/apigateway/v1/administration/user' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your_api_token>' \
-d '{
"UserId": "jpascal",
"UserName": "João Pascal",
"UserLogin": "jpascal",
"UserPassword": "14UwDX2S9&1u",
"UserLanguage": "1",
"IsActive": 1,
"IsEnabled": 0,
"UserEmail": "jpascal@softexpert.com",
"AccGroupIdArray": "FULL",
"DeptPosArray": {
"DeptPos": {
"DepartmentID": "MKT.D.01",
"DepartmentName": "Marketing Division",
"PositionID": "MKT.P.01",
"PositionName": "Marketing Director"
}
},
"UpdateType": "1"
}' -X POST
info

Upon first access, the user will need to update their password. It is of paramount importance for the user to know the first password sent during the creation request. This measure ensures the security and integrity of their information.

Response example:

{
"UserId": "jpascal",
"Status": "Success",
"Detail": "Record successfully added"
}

Further considerations​

  1. Additional fields: If you want to insert additional fields in the user record, make sure to check the SoftExpert Administration API documentation in order to learn about all available parameters.
  2. Password validation: When creating or updating a user, remember that the provided password must meet the complexity requirements set by your organization's security policy.
  3. System requirements: Before creating or updating users in SoftExpert Suite, make sure your installation meets all system requirements. Refer to the official documentation for more information.
  4. Access permissions: Any user that creates users must have the adequate permissions to execute user creation and update actions in SoftExpert Suite. Otherwise, contact the system administrator.
  5. Error treatment: If an error occurs during the creation or update of a user, check the error messages and try fixing the problem before another attempt.