MDM
Update Access
Function: update_access Type: API Endpoint (PUT)
Purpose: This endpoint updates the access rights of a user for a specific application.
URL: PUT /api/mdm/update_access
Request Parameters:
- request (Request): The request object.
- update_request (UpdateAccessRequest): An object containing details about the user, menu, and table access to be updated.
- Customer_Key (Header, required): A base64 encoded string containing lscode and firmcode.
- User_Code (Header, required): A base64 encoded string containing the user code.
- App_Code (Header, optional): A base64 encoded string containing the application code.
- db (Session): The database session, obtained via dependency injection.
Process:
- Decodes the Customer_Key to extract lscode and firmcode.
- Validates the User_Code.
- Updates the user details (email, mobile).
- Updates the menu access.
- Updates the table access.
- Fetches the updated user details, menu access, and table access.
- Constructs and returns a JSON response detailing the updated access rights.
Response:
- A JSON object containing the updated user details, menu access, and table access.
- Indicates success or failure for each step, including any errors encountered.
Exceptions:
- Handles exceptions related to database operations and invalid customer key formats, providing appropriate error messages.
put/api/mdm/update_access
Headers
Customer-Keystring required
User-Codestring required
App-Codestring required
Request body
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.