Users
The user API for managing and importing users from other existing systems is a feature that allows users to manage and import user accounts from other systems into the lock management system. This feature can be accessed through a web portal or mobile app, and allows users to manage and import user accounts from other systems such as Active Directory, LDAP, or other user management platforms.
The User API allows the administrator to import user accounts from other systems, including information such as the user's name, email address, and any other relevant information. This eliminates the need to manually create user accounts one by one and ensures that the user management system is always up-to-date with the most current user information.
The User API also allows the administrator to manage user accounts within the lock management system. This includes the ability to add, edit, and delete users, as well as assign and revoke access to specific locks or groups of locks. The administrator can also assign roles and permissions to users, such as the ability to manage other users or access specific features within the lock management system.
Overall, the User API for managing and importing users from other existing systems is a powerful tool that streamlines user management and ensures that the lock management system is always up-to-date with the most current user information, providing an extra layer of security for the lock management system.
GET
{{host}}/api/users?pagenumber=1&limit=10
Description:
This endpoint retrieves a list of users in the system.
Query Parameters:
pagenumber
: The page number of the results (required)limit
: The number of results per page (required)
Response:
status
: A status code indicating the success or failure of the request. 1 indicates success, and 0 indicates failure.msg
: A message indicating the result of the request.totalPage
: The total number of pages of the resultscurrentPage
: The current page of the resultslist
: An array of user objectsisAdmin
: A boolean value indicating if the user is admin or notuser_id
: The unique ID of the useremployee_id
: The ID of the userdepartment
: The department the user belongs to.firstname
: The first name of the userlastname
: The last name of the useremailid
: The email address of the userisActive
: A boolean value indicating if the user is active or notcreated_date
: The date when the user created
Errors:
- If any of the required parameters are missing, the response will be a
status
of 0 and a message indicating the missing field(s). - If there are no users in the system, the response will be a
status
of 1 and an emptylist
array.
POST
{{host}}/api/user
Description:
This endpoint creates a new user in the system.
Body Parameters:
id
: The ID of the user (required)firstname
: The first name of the user (required)lastname
: The last name of the user (required)emailid
: The email address of the user (required)department
: The department the user belongs to
Response:
status
: A status code indicating the success or failure of the request. 1 indicates success, and 0 indicates failure.msg
: A message indicating the result of the request.
PUT
{{host}}/api/user
Description:
This endpoint allows you to update an existing user in the system.
Body (Raw JSON):
Parameters:
user_id
: The unique identifier for the user. (required)id
: The employee id of the user. (required)firstname
: The first name of the user.lastname
: The last name of the user.emailid
: The email address of the user.department
: The department the user belongs to.
Response:
status
: A status code indicating the success or failure of the request. 1 indicates success, and 0 indicates failure.msg
: A message indicating the result of the request.user
: An object representing the updated user. It includes the following fields:isAdmin
: A boolean indicating whether the user is an admin.user_id
: The unique identifier for the user.employee_id
: The employee id of the user.department
: The department the user belongs to.firstname
: The first name of the user.lastname
: The last name of the user.emailid
: The email address of the user.isActive
: A boolean indicating whether the user is active.created_date
: The date and time the user was created.
DELETE
{{host}}/api/user
Description:
This endpoint allows you to delete an existing user in the system.
Body (Raw JSON):
Parameters:
user_id
: The unique identifier for the user. (required)
Response:
status
: A status code indicating the success or failure of the request. 1 indicates success, and 0 indicates failure.msg
: A message indicating the result of the request.