{"openapi":"3.0.0","info":{"title":"Account Controller API","description":"Account management endpoints for user authentication, profile management, and password/security settings.\nThis API handles user login/logout, profile updates, password changes, and identity question management.\n","version":"1.0.0","contact":{"name":"Forensic Analytics Support"},"license":{"name":"Proprietary"}},"servers":[{"url":"/api","description":"API Server"}],"tags":[{"name":"Account","description":"Account authentication and profile management endpoints"}],"paths":{"/Account/Index":{"get":{"tags":["Account"],"summary":"Get user account details","description":"Retrieves the current authenticated user's account information including profile details, password settings, available identity questions, and team membership.","operationId":"getAccountDetails","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Account details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailsGetResponse"}}}},"401":{"description":"User is not authenticated"},"500":{"description":"Server error occurred while retrieving account details"}}},"post":{"tags":["Account"],"summary":"Update user account details","description":"Updates the current authenticated user's profile information including first name, last name, and international number preference.","operationId":"updateAccountDetails","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailsPostRequest"}}}},"responses":{"200":{"description":"Account details updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true}}}}}},"400":{"description":"Invalid request parameters"},"401":{"description":"User is not authenticated"},"422":{"description":"Validation error - invalid field values"}}}},"/Account/AzureAdLogin":{"get":{"tags":["Account"],"summary":"Azure AD login","description":"Handles authentication for users logged in via Azure Active Directory/Entra ID. Validates user identity claims and completes login process.","operationId":"azureAdLogin","security":[{"bearerAuth":[]}],"responses":{"302":{"description":"Redirect to dashboard after successful login"},"400":{"description":"Missing required Azure AD claims (preferred_username)"},"500":{"description":"Server error occurred during Azure AD authentication"}}}},"/Account/IsLoggedIn":{"get":{"tags":["Account"],"summary":"Check login status","description":"Determines if the user is currently logged in and has an allocated license seat.\nReturns user profile, license information, user preferences, and system configuration.\n","operationId":"isLoggedIn","responses":{"200":{"description":"Login status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsLoggedInResponse"}}}},"500":{"description":"Server error occurred while checking login status"}}}},"/Account/LogOn":{"get":{"tags":["Account"],"summary":"Get login page data","description":"Retrieves configuration and license data needed for the login page.\nSupports CSAS server integration via encoded user ID parameter.\n","operationId":"getLoginPage","parameters":[{"name":"cuid","in":"query","description":"Encoded CSAS user ID (base64 encoded string containing userId|salt|lastCSASLoginUtc)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Login page data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogOnGetResponse"}}}},"500":{"description":"Server error occurred while retrieving login data"}}},"post":{"tags":["Account"],"summary":"Authenticate user","description":"Authenticates a user with their username and password.\nReturns success status and error message if authentication fails.\nAllocates a license seat for successful logins.\n","operationId":"logOn","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogOnModel"}}}},"responses":{"200":{"description":"Authentication attempt completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogOnPostResponse"}}}},"400":{"description":"Invalid request format"},"500":{"description":"Server error occurred during authentication"}}}},"/Account/LogOff":{"post":{"tags":["Account"],"summary":"User logout","description":"Logs out the current authenticated user.\nDeallocates their license seat and clears authentication cookies.\n","operationId":"logOff","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"User logged off successfully","content":{"application/json":{"schema":{"type":"object","properties":{"isUsingAzureAd":{"type":"boolean","description":"Whether Azure AD authentication is configured"},"baseUrl":{"type":"string","description":"Base URL for redirect"}}}}}},"401":{"description":"User is not authenticated"},"500":{"description":"Server error occurred during logout"}}}},"/Account/IsAValidUsername":{"post":{"tags":["Account"],"summary":"Validate username","description":"Checks if a username exists in the system and returns information about identity questions setup.\nUsed during password recovery process.\n","operationId":"isAValidUsername","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsAValidUsernameRequest"}}}},"responses":{"200":{"description":"Username validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIdentityQuestionsResponse"}}}},"400":{"description":"Invalid request format"},"422":{"description":"Validation error"}}}},"/Account/ValidateIdentityQuestions":{"post":{"tags":["Account"],"summary":"Validate identity questions","description":"Validates user's answers to security questions.\nIf validation succeeds, generates and returns a new temporary password.\nUsed for password recovery flows.\n","operationId":"validateIdentityQuestions","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateIdentityQuestionsRequest"}}}},"responses":{"200":{"description":"Identity questions validation result","content":{"application/json":{"schema":{"type":"object","properties":{"isValid":{"type":"boolean","description":"Whether identity questions were answered correctly"},"newPassword":{"type":"string","description":"Generated temporary password (empty if invalid)"}}}}}},"400":{"description":"Invalid request format"},"422":{"description":"Validation error"}}}},"/Account/IdentityQuestions":{"get":{"tags":["Account"],"summary":"Get available identity questions","description":"Returns a list of all available security questions that users can select for their account.","operationId":"getIdentityQuestions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Available questions retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/IdentityQuestion"}}}}}}},"401":{"description":"User is not authenticated"}}},"post":{"tags":["Account"],"summary":"Set identity questions","description":"Sets up security questions and answers for the authenticated user.\nRequires three questions with corresponding answers for password recovery.\n","operationId":"setIdentityQuestions","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityQuestionsPostRequest"}}}},"responses":{"200":{"description":"Identity questions set successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"errors":{"type":"array","items":{"type":"string"},"description":"Validation errors (only present if success is false)"}}}}}},"400":{"description":"Invalid request format"},"401":{"description":"User is not authenticated"},"422":{"description":"Validation error"}}}},"/Account/SetPassword":{"post":{"tags":["Account"],"summary":"Change user password","description":"Changes the password for the authenticated user.\nRequires validation of the current password and conformance to password policy rules.\n","operationId":"setPassword","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}}},"responses":{"200":{"description":"Password changed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true}}}}}},"400":{"description":"Invalid request format"},"401":{"description":"User is not authenticated"},"422":{"description":"Validation error or password policy violation"}}}}},"components":{"schemas":{"DetailsGetResponse":{"type":"object","description":"User account details","properties":{"firstname":{"type":"string","description":"User's first name"},"lastname":{"type":"string","description":"User's last name"},"showPasswordFields":{"type":"boolean","description":"Whether password fields should be shown (depends on auth strategy)"},"availableQuestions":{"type":"array","items":{"$ref":"#/components/schemas/IdentityQuestion"},"description":"List of available security questions"},"question1":{"type":"string","description":"Selected security question 1"},"question2":{"type":"string","description":"Selected security question 2"},"question3":{"type":"string","description":"Selected security question 3"},"minimumLengthOfNewPassword":{"type":"integer","description":"Minimum password length requirement"},"passwordMustContainMixtureOfUpperAndLowerCase":{"type":"boolean","description":"Password complexity requirement"},"passwordMustContainNumber":{"type":"boolean","description":"Password must contain numeric character"},"passwordMustContainSymbol":{"type":"boolean","description":"Password must contain special character"},"allowUsersToOverrideInternationalPrefixSetting":{"type":"boolean","description":"Whether users can choose international number format"},"useInternationalNumber":{"type":"boolean","description":"User's international number preference"},"highLevelRole":{"type":"string","description":"User's role (e.g., Admin, ITSupport, User)"},"securityLevel":{"type":"string","description":"User's security level ID"},"teams":{"type":"string","description":"Comma-separated list of teams user belongs to"}}},"DetailsPostRequest":{"type":"object","description":"Request to update user account details","required":["firstname","lastname"],"properties":{"firstname":{"type":"string","description":"User's new first name","minLength":1},"lastname":{"type":"string","description":"User's new last name","minLength":1},"useInternationalNumber":{"type":"boolean","description":"International number format preference"}}},"IsLoggedInResponse":{"type":"object","description":"Login status and user information","properties":{"isLoggedIn":{"type":"boolean","description":"Whether user is currently logged in with valid license seat"},"user":{"$ref":"#/components/schemas/AppIdentity"},"licence":{"$ref":"#/components/schemas/LicenceData"},"cellViewLicence":{"$ref":"#/components/schemas/LicenceData"},"preferences":{"$ref":"#/components/schemas/UserPreferences"},"headerState":{"$ref":"#/components/schemas/HeaderState"},"useAsCSASServer":{"type":"boolean","description":"Whether system is configured as CSAS server"}}},"LogOnGetResponse":{"type":"object","description":"Login page configuration and license data","properties":{"isUsingAzureAd":{"type":"boolean","description":"Whether Azure AD authentication is configured"},"showForgottenPassword":{"type":"boolean","description":"Whether forgot password option should be shown"},"licenceData":{"$ref":"#/components/schemas/LicenceDataResponse"},"cellViewLicenceData":{"type":"object","properties":{"coversCellView":{"type":"boolean"}}},"productInfo":{"type":"object","description":"Product version and information"},"adminContact":{"type":"string","description":"Administrator contact information"},"useAsCSASServer":{"type":"boolean","description":"Whether system is configured as CSAS server"}}},"LogOnModel":{"type":"object","description":"Login credentials","required":["userName","password"],"properties":{"userName":{"type":"string","description":"Username","minLength":1},"password":{"type":"string","description":"Password","minLength":1}}},"LogOnPostResponse":{"type":"object","description":"Login response","properties":{"success":{"type":"boolean","description":"Whether login was successful"},"error":{"type":"string","description":"Error message if login failed"}}},"IsAValidUsernameRequest":{"type":"object","description":"Request to validate username","required":["username"],"properties":{"username":{"type":"string","description":"Username to validate","minLength":1}}},"GetIdentityQuestionsResponse":{"type":"object","description":"Identity questions information","properties":{"isValid":{"type":"boolean","description":"Whether username is valid"},"username":{"type":"string","description":"The username being queried"},"areIdentityQuestionsSetup":{"type":"boolean","description":"Whether identity questions are configured for this user"},"question1":{"$ref":"#/components/schemas/IdentityQuestion"},"question2":{"$ref":"#/components/schemas/IdentityQuestion"},"question3":{"$ref":"#/components/schemas/IdentityQuestion"}}},"ValidateIdentityQuestionsRequest":{"type":"object","description":"Request to validate identity question answers","required":["username","answer1"],"properties":{"username":{"type":"string","description":"Username"},"answer1":{"type":"string","description":"Answer to first identity question"},"answer2":{"type":"string","description":"Answer to second identity question (if required)"},"answer3":{"type":"string","description":"Answer to third identity question (if required)"}}},"IdentityQuestionsPostRequest":{"type":"object","description":"Request to set identity questions","required":["question1","answer1","question2","answer2","question3","answer3"],"properties":{"question1":{"type":"string","description":"First security question"},"answer1":{"type":"string","description":"Answer to first question"},"question2":{"type":"string","description":"Second security question"},"answer2":{"type":"string","description":"Answer to second question"},"question3":{"type":"string","description":"Third security question"},"answer3":{"type":"string","description":"Answer to third question"}}},"SetPasswordRequest":{"type":"object","description":"Request to change password","required":["newPassword","existingPassword"],"properties":{"newPassword":{"type":"string","description":"New password (must meet password policy)","minLength":1},"existingPassword":{"type":"string","description":"Current password for verification","minLength":1}}},"IdentityQuestion":{"type":"object","description":"Security question","properties":{"key":{"type":"string","description":"Question identifier"},"value":{"type":"string","description":"Question text"}}},"AppIdentity":{"type":"object","description":"Current user identity information","properties":{"userId":{"type":"string","format":"uuid","description":"User's unique ID"},"username":{"type":"string","description":"Username"},"firstname":{"type":"string","description":"User's first name"},"lastname":{"type":"string","description":"User's last name"},"fullName":{"type":"string","description":"User's full name"},"highLevelRole":{"type":"string","description":"User's role"},"securityLevelId":{"type":"string","format":"uuid","description":"User's security level"},"teams":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of team IDs user belongs to"},"organisationId":{"type":"string","format":"uuid","description":"User's organization ID"}}},"LicenceData":{"type":"object","description":"Product license information","properties":{"hasExpired":{"type":"boolean","description":"Whether license has expired"},"coversIdentifierSearch":{"type":"boolean","description":"Whether license covers identifier search feature"},"coversRFSurveyData":{"type":"boolean","description":"Whether license covers RF survey data feature"},"coversMessageContent":{"type":"boolean","description":"Whether license covers message content feature"},"coversReporting":{"type":"boolean","description":"Whether license covers reporting feature"},"coversFileUpload":{"type":"boolean","description":"Whether license covers file upload feature"},"coversAddressSearch":{"type":"boolean","description":"Whether license covers address search feature"},"installationID":{"type":"string","description":"Installation ID"}}},"LicenceDataResponse":{"type":"object","description":"Product license information for login response","properties":{"hasExpired":{"type":"boolean"},"coversIdentifierSearch":{"type":"boolean"},"coversRFSurveyData":{"type":"boolean"},"coversMessageContent":{"type":"boolean"},"coversReporting":{"type":"boolean"},"coversFileUpload":{"type":"boolean"},"coversAddressSearch":{"type":"boolean"},"installationID":{"type":"string"}}},"UserPreferences":{"type":"object","description":"User's application preferences","additionalProperties":true},"HeaderState":{"type":"object","description":"User information for page header","properties":{"fullName":{"type":"string","description":"User's full name"},"hasCompletedIdentityQuestions":{"type":"boolean","description":"Whether user has set up identity questions"},"forcePasswordChange":{"type":"boolean","description":"Whether user must change password on next login"},"versionNumber":{"type":"string","description":"Application version"},"notificationsCount":{"type":"integer","description":"Count of pending notifications"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"JWT Bearer token or Cookie-based authentication"}},"responses":{"Unauthorized":{"description":"User is not authenticated"},"BadRequest":{"description":"Invalid request format"},"ValidationError":{"description":"Request validation failed"},"InternalServerError":{"description":"Server error occurred"}}}}