{"openapi":"3.1.0","info":{"title":"LAU IdAM Back-End API","description":"Log and Audit IdAM Back-End API, used for auditing IdAM logons.","license":{"name":"REFORM Common Components","url":""},"version":"0.1"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"name":"IdAM logon database operations.","description":"This is the Log and Audit Back-End API that will audit IdAM logons. The API will be invoked by IdAM service."},{"name":"User deletion operations","description":"This is the Log and Audit Back-End API that will audit user account deletions. The API will be invoked by IdAM service."}],"paths":{"/audit/logon":{"get":{"tags":["GET end-points","IdAM logon database operations."],"summary":"Retrieve login audits","description":"This operation will query and return a list of logins based on the search conditions provided in the URL path.","operationId":"getLogonLog","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK........."},{"name":"Service Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK........."},{"name":"User ID","in":"query","required":false,"schema":{"type":"string"},"example":3748238},{"name":"Email Address","in":"query","required":false,"schema":{"type":"string"},"example":"firstname.lastname@company.com"},{"name":"Start Timestamp","in":"query","required":false,"schema":{"type":"string"},"example":"2021-06-23 22:20:05"},{"name":"End Timestamp","in":"query","required":false,"schema":{"type":"string"},"example":"2021-08-23 22:20:05"},{"name":"Size","in":"query","required":false,"schema":{"type":"string"},"example":500},{"name":"Page","in":"query","required":false,"schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"Request executed successfully. Response contains of logon logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogGetResponse"}}}},"400":{"description":"Missing userId, emailAddress, startTimestamp or endTimestamp parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogGetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogGetResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogGetResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogGetResponse"}}}}}},"post":{"tags":["IdAM logon database operations.","POST end-point"],"summary":"Save IdAM logon audits","description":"This operation will persist IdAM logons entries which are posted in the request. Single IdAM LogonAudit per request will be stored in the database.","operationId":"saveLogonLog","parameters":[{"name":"Service Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK........."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogPostRequest"}}},"required":true},"responses":{"201":{"description":"Created logonLog response - includes id from DB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogPostResponse"}}}},"400":{"description":"Invalid logon audit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogPostResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogPostResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogonLogPostResponse"}}}}}}},"/audit/deletedAccounts":{"get":{"tags":["User Accounts endpoints","User deletion operations"],"summary":"Retrieve deleted user accounts","description":"Query deleted user accounts based on search conditions provided via URL params","operationId":"getUserDeletions","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK........."},{"name":"Service Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK........."},{"name":"requestParams","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DeletionLogGetRequestParams"}}],"responses":{"200":{"description":"Request executed successfully. Response will contain list of deletion logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"400":{"description":"Missing required parameter(s). startTimestamp and endStamp are both required and at least one of userId, emailAddress, firstName or lastName","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}}}},"post":{"tags":["User Accounts endpoints","User deletion operations"],"summary":"Save IdAM user deletion audit","description":"This operation will persist IdAM user deletion entries which are posted in the request. Single IdAM UserDeletionAudit per request will be stored in the database.","operationId":"saveUserDeletion","parameters":[{"name":"Service Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXAiOiJK..."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionPostRequest"}}},"required":true},"responses":{"201":{"description":"Created userDeletionAudit response - includes id from DB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionPostResponse"}}}},"400":{"description":"Invalid userDeletion audit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionPostResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionPostResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionPostResponse"}}}}}}},"/audit/getAllDeletedAccounts":{"get":{"tags":["User Accounts endpoints","User deletion operations"],"summary":"Retrieve all deleted user accounts","description":"Query all deleted user accounts based on size and sort","operationId":"getAllDeletedUsers","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXYiOiJK........."},{"name":"Service Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer eyJ0eXYiOiJK........."},{"name":"requestParams","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DeletionLogAllUsersRequestParams"}}],"responses":{"200":{"description":"Request executed successfully. Response will contain list of deleted users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"400":{"description":"Missing required parameter(s). size is required ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionGetResponse"}}}}}}},"/":{"get":{"tags":["root-controller"],"operationId":"welcome","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"LogonLog":{"type":"object","description":"Data model for the IdAM logon request","properties":{"userId":{"type":"string","description":"The user on whose behalf the logon took place"},"emailAddress":{"type":"string","description":"The email address of the logon user"},"service":{"type":"string","description":"The service the logon user is accessing"},"ipAddress":{"type":"string","description":"The client ip address of the logon user"},"loginState":{"type":"string","description":"Idam login state"},"timestamp":{"type":"string","description":"When the operation took place with microseconds in iso-8601-date-and-time-format"}}},"LogonLogPostRequest":{"type":"object","properties":{"logonLog":{"$ref":"#/components/schemas/LogonLog"}}},"LogonLogPostResponse":{"type":"object","properties":{"logonLog":{"$ref":"#/components/schemas/LogonLogResponse"}}},"LogonLogResponse":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"emailAddress":{"type":"string"},"service":{"type":"string"},"ipAddress":{"type":"string"},"loginState":{"type":"string"},"timestamp":{"type":"string"}}},"DeletionLog":{"type":"object","description":"Data model for the IdAM user deletion request","properties":{"userId":{"type":"string","description":"IdAM ID of the deleted user."},"emailAddress":{"type":"string","description":"Email address/username of the deleted user."},"firstName":{"type":"string","description":"First name of deleted user"},"lastName":{"type":"string","description":"Last name of deleted user"},"deletionTimestamp":{"type":"string","description":"When the operation took place with microseconds in iso-8601-date-and-time-format."}}},"UserDeletionPostRequest":{"type":"object","properties":{"deletionLogs":{"type":"array","items":{"$ref":"#/components/schemas/DeletionLog"}}}},"UserDeletionPostResponse":{"type":"object","properties":{"deletionLogs":{"type":"array","items":{"$ref":"#/components/schemas/DeletionLog"}}}},"LogonLogGetResponse":{"type":"object","description":"IdAM Logon GET Response","properties":{"logonLog":{"type":"array","items":{"$ref":"#/components/schemas/LogonLog"}},"startRecordNumber":{"type":"integer","format":"int32","description":"The index of the first record out of the full result set provided in the result set"},"moreRecords":{"type":"boolean","description":"Indicates whether there are more records beyond the current page in the full result set"},"totalNumberOfRecords":{"type":"integer","format":"int64","description":"The total number of records in the full result set"}}},"DeletionLogAllUsersRequestParams":{"type":"object","properties":{"page":{"type":"string"},"size":{"type":"string"},"sort":{"type":"string"}}},"UserDeletionGetResponse":{"type":"object","description":"IdAM user deletion audit GET Response","properties":{"deletionLogs":{"type":"array","items":{"$ref":"#/components/schemas/DeletionLog"}},"startRecordNumber":{"type":"integer","format":"int64","description":"The index of the first record out of the full result set provided in the result set"},"moreRecords":{"type":"boolean","description":"Indicates whether there are more records beyond the current page in the full result set"},"totalNumberOfRecords":{"type":"integer","format":"int64","description":"The total number of records in the full result set"}}},"DeletionLogGetRequestParams":{"type":"object","description":"Data model for the IdAM user deletion request","properties":{"userId":{"type":"string"},"emailAddress":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"startTimestamp":{"type":"string"},"endTimestamp":{"type":"string"},"size":{"type":"string"},"page":{"type":"string"}}}}}}
