LeapsurgeBI
User Details Crud
Function: user_details_crud Type: API Endpoint (POST)
Purpose: Performs create, read, update, and delete operations for Leapsurge BI users. The operation is selected through the action header, while the request body supplies user details, firm access, report access, menu access, and RLS access details as needed.
Headers:
- LSCode (str, required): Base64 encoded LS code to identify the customer context.
- action (str, required): CRUD action to perform. Supported values are: create, read, update, and delete.
Request Body:
- user_code (str, optional): Required for update and delete; optional filter for read.
- user_details (dict, optional): User master details such as first_name, last_name, email, mobile, password, application_code, user_group_code, is_active, is_administrator, is_license, two_factor_auth, is_support_admin, default_firm, is_group, and access_sync_app.
- firm_access (list, optional): Firm access records for LS_User_Firm_Access, each with firm_code and active.
- report_details (list, optional): Report access records, each with report_code or report_id, and access.
- menu_details (list, optional): Menu access records, each with menuCode, menu_code, or menu_id, and access.
- rls_details (list, optional): Userwise RLS access records with report_code, rls_email, rls_role, active, and optional hierarchy fields.
- modified_user (str, optional): User name to store in audit columns. Defaults to the authenticated user's name/email.
Behavior:
- create: Creates an LS_User_Master record, generates a new user code, updates the serial number, and inserts related firm/report/menu/RLS access records.
- read: Returns one user when user_code is supplied, otherwise returns all users for the decoded LSCode.
- update: Updates user master fields and replaces supplied firm/report/menu/RLS access sets.
- delete: Deletes the user and related firm/report/menu/RLS access records for the decoded LSCode.
Response: Returns a JSON response with status, message, and when applicable user_code or data.
Exceptions:
- Returns HTTP 400 for invalid customer key, invalid action, missing required input, or duplicate email.
- Returns HTTP 404 when an update/delete user is not found.
- Returns HTTP 500 with the exception message if an unexpected error occurs.
post/api/LeapsurgeBI/user_details_crud
Request
- Base URLhttps://api.leapsurgebi.com (the document declares no server; this is the origin it was published from)
- AuthOAuth 2PasswordToken URL/auth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
LSCodestring required
actionstring required
Request body
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 3 revisions of this API.