{"openapi":"3.1.0","info":{"description":"lau-eud-backend","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"lau-eud-backend","version":"v0.0.1"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/lau-eud-backend"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"description":"This is the Log and audit for Enhanced User DeatilsBack-End API that will provide user data. The API will be invoked by LAU front-end service (GET).","name":"User Details Operation"}],"paths":{"/":{"get":{"operationId":"welcome","responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["root-controller"]}},"/audit/userData":{"get":{"description":"Query User Data based on search conditions provided via URL params","operationId":"getUserData","parameters":[{"example":"Bearer eyJ0eXAiOiJK.........","in":"header","name":"Service Authorization","required":true,"schema":{"type":"string"}},{"in":"query","name":"requestParams","required":true,"schema":{"$ref":"#/components/schemas/UserDataGetRequestParams"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDataResponse"}}},"description":"Request executed successfully. Response will contain details of user"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDataResponse"}}},"description":"Missing required parameter. userId or emailAddress is mandatory"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDataResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDataResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDataResponse"}}},"description":"Internal Server Error"}},"summary":"Retrieve User Data","tags":["User Details Operation","User Data endpoints"]}},"/audit/userUpdates":{"get":{"description":"Query User Account updates for a given user id","operationId":"getUserAccountUpdates","parameters":[{"example":"Bearer eyJ0eXAiOiJK.........","in":"header","name":"Service Authorization","required":true,"schema":{"type":"string"}},{"in":"query","name":"requestParams","required":true,"schema":{"$ref":"#/components/schemas/UserDataGetRequestParams"}},{"description":"Zero-based page index (0..N)","in":"query","name":"page","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"description":"The size of the page to be returned","in":"query","name":"size","required":false,"schema":{"type":"integer","default":20,"minimum":1}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdatesResponse"}}},"description":"Request executed successfully. Response will contain user account updates"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdatesResponse"}}},"description":"userId is mandatory"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdatesResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdatesResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdatesResponse"}}},"description":"Internal Server Error"}},"summary":"Retrieve User Account updates","tags":["User Details Operation","User Data endpoints"]}}},"components":{"schemas":{"ContactInformationResponse":{"type":"object","description":"Organisational Contact Information","properties":{"addressLine1":{"type":"string","description":"Address line 1 of the user's organisation."},"addressLine2":{"type":"string","description":"Address line 2 of the user's organisation."},"addressLine3":{"type":"string","description":"Address line 3 of the user's organisation."},"country":{"type":"string","description":"Country of the user's organisation."},"county":{"type":"string","description":"County of the user's organisation."},"postCode":{"type":"string","description":"Postcode of the user's organisation."},"townCity":{"type":"string","description":"TownCity of the user's organisation."}}},"UserDataGetRequestParams":{"type":"object","description":"Data model for the User Data request","properties":{"atLeastOneProvided":{"type":"boolean"},"email":{"type":"string"},"userId":{"type":"string","maxLength":64,"minLength":0}},"required":["userId"]},"UserDataResponse":{"type":"object","properties":{"accountCreationDate":{"type":"string","description":"User's account creation timestamp in iso-8601-date-and-time-format."},"accountStatus":{"type":"string","description":"Account Status of user"},"email":{"type":"string","description":"Email address/username of the user."},"forename":{"type":"string","description":"Forename of the user."},"meta":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}},"description":"Metadata related to the user data response."},"organisationalAddress":{"type":"array","description":"User Organisation Address","items":{"$ref":"#/components/schemas/ContactInformationResponse"}},"recordType":{"type":"string","description":"RecordType of user"},"roles":{"type":"array","description":"User's roles.","items":{"type":"string"}},"surname":{"type":"string","description":"Surname of the user."},"userId":{"type":"string","description":"IdAM ID of the user."}}},"UserUpdate":{"type":"object","properties":{"eventName":{"type":"string"},"eventType":{"type":"string","enum":["ADD","MODIFY","REMOVE"]},"previousValue":{"type":"string"},"principalId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"value":{"type":"string"}}},"UserUpdatesResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/UserUpdate"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"}}}}}}
