{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"paths":{"/v1/userprofile/{userId}":{"put":{"tags":["user-profile-controller"],"summary":"Update a User Profile","operationId":"updateUserProfile","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"origin","in":"query","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"updateUserProfileData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserProfileData"}}},"required":true},"responses":{"200":{"description":"User Profile has been Updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileCreationResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"No User Profile found with the given ID"},"412":{"description":"One or more of the Roles provided is already assigned to the User"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/v1/userprofile/users":{"post":{"tags":["user-profile-controller"],"summary":"Retrieve multiple User Profiles","operationId":"retrieveUserProfiles","parameters":[{"name":"showdeleted","in":"query","required":true,"schema":{"type":"string"}},{"name":"rolesRequired","in":"query","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"userProfileDataRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDataRequest"}}},"required":true},"responses":{"200":{"description":"Successfully retrieved multiple User Profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDataResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"No User Profile found with the given ID"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]},"delete":{"tags":["user-profile-controller"],"summary":"Delete User Profiles by User ID or Email Pattern","operationId":"deleteUserProfileByIdOrEmailPattern","parameters":[{"name":"userId","in":"query","required":false,"schema":{"type":"string"}},{"name":"emailPattern","in":"query","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"User Profiles deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfilesDeletionResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/v1/userprofile":{"get":{"tags":["user-profile-controller"],"summary":"Retrieve a User Profile by Email or ID. If both are present then Email is used to retrieve.","operationId":"getUserProfileByEmail","parameters":[{"name":"userId","in":"query","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Representation of a User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"No User Profile found with the given ID"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]},{"UserEmail":[]}]},"post":{"tags":["user-profile-controller"],"summary":"Create a User Profile","operationId":"createUserProfile","parameters":[{"name":"origin","in":"query","description":"Any Valid String is allowed","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"userProfileCreationData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileCreationData"}}},"required":true},"responses":{"201":{"description":"User Profile created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileCreationResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"409":{"description":"A User already exists with the given information"},"429":{"description":"Too many requests made for re-invite"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]},"delete":{"tags":["user-profile-controller"],"summary":"Delete User Profiles","operationId":"deleteUserProfiles","parameters":[{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"userProfilesDeletionDataReq","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDataRequest"}}},"required":true},"responses":{"204":{"description":"User Profiles deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfilesDeletionResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/v1/userprofile/":{"post":{"tags":["user-profile-controller"],"summary":"Create a User Profile","operationId":"createUserProfile_1","parameters":[{"name":"origin","in":"query","description":"Any Valid String is allowed","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"userProfileCreationData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileCreationData"}}},"required":true},"responses":{"201":{"description":"User Profile created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileCreationResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"409":{"description":"A User already exists with the given information"},"429":{"description":"Too many requests made for re-invite"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/v1/userprofile/{id}/roles":{"get":{"tags":["user-profile-controller"],"summary":"Retrieves a User Profile and their Roles with the given ID","operationId":"getUserProfileWithRolesById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Any Valid String is allowed","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Representation of a User profile with their Roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithRolesResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"Not User Profile found with the given ID"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/v1/userprofile/roles":{"get":{"tags":["user-profile-controller"],"summary":"Retrieves a User Profile and their Roles with the given Email Address","operationId":"getUserProfileWithRolesByEmail","parameters":[{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Representation of a User profile with their Roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithRolesResponse"}}}},"400":{"description":"An invalid request has been provided"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"No User Profile found with the given Email Address"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]},{"UserEmail":[]}]}},"/v1/userprofile/idamStatus":{"get":{"tags":["user-profile-controller"],"summary":"Retrieves email IDs and IDAM status of user profiles","operationId":"getUserProfileIdamStatus","parameters":[{"name":"category","in":"query","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdamStatusWithEmailResponse"}}}},"400":{"description":"There is a problem with your request. Please check and try again"},"401":{"description":"Unauthorized Error : The requested resource is restricted and requires authentication"},"403":{"description":"Forbidden Error: Access denied"},"404":{"description":"Could not find any profiles"},"500":{"description":"Internal Server Error"}},"security":[{"ServiceAuthorization":[]},{"Authorization":[]}]}},"/":{"get":{"tags":["welcome-controller"],"summary":"Welcome to the System User Profile Data API","operationId":"welcome","parameters":[{"name":"Authorization","in":"header","description":"Authorization token","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"UserEmail","in":"header","description":"UserEmail","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Welcome message","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"RoleName":{"type":"object","properties":{"name":{"type":"string"}}},"UpdateUserProfileData":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"idamStatus":{"type":"string"},"rolesAdd":{"type":"array","items":{"$ref":"#/components/schemas/RoleName"},"uniqueItems":true},"rolesDelete":{"type":"array","items":{"$ref":"#/components/schemas/RoleName"},"uniqueItems":true}}},"UserProfileCreationResponse":{"type":"object","properties":{"idamId":{"type":"string"},"idamRegistrationResponse":{"type":"integer","format":"int32"}}},"UserProfileDataRequest":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}}},"AttributeResponse":{"type":"object","properties":{"idamStatusCode":{"type":"integer","format":"int32"},"idamMessage":{"type":"string"}}},"RoleAdditionResponse":{"type":"object","properties":{"idamStatusCode":{"type":"string"},"idamMessage":{"type":"string"}}},"RoleDeletionResponse":{"type":"object","properties":{"roleName":{"type":"string"},"idamStatusCode":{"type":"string"},"idamMessage":{"type":"string"}}},"UserProfileDataResponse":{"type":"object","properties":{"userProfiles":{"type":"array","items":{"$ref":"#/components/schemas/UserProfileWithRolesResponse"}}}},"UserProfileWithRolesResponse":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"idamStatus":{"type":"string"},"roleAdditionResponse":{"$ref":"#/components/schemas/RoleAdditionResponse"},"roleDeletionResponse":{"type":"array","items":{"$ref":"#/components/schemas/RoleDeletionResponse"}},"attributeResponse":{"$ref":"#/components/schemas/AttributeResponse"},"roles":{"type":"array","items":{"type":"string"}},"idamStatusCode":{"type":"string"},"idamMessage":{"type":"string"},"userIdentifier":{"type":"string"}}},"UserProfileCreationData":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"languagePreference":{"type":"string"},"emailCommsConsent":{"type":"boolean"},"postalCommsConsent":{"type":"boolean"},"userCategory":{"type":"string"},"userType":{"type":"string"},"roles":{"type":"array","items":{"type":"string"},"minItems":1},"resendInvite":{"type":"boolean"}},"required":["email","firstName","lastName","roles"]},"UserProfileResponse":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"idamStatus":{"type":"string"},"roleAdditionResponse":{"$ref":"#/components/schemas/RoleAdditionResponse"},"roleDeletionResponse":{"type":"array","items":{"$ref":"#/components/schemas/RoleDeletionResponse"}},"attributeResponse":{"$ref":"#/components/schemas/AttributeResponse"},"roles":{"type":"array","items":{"type":"string"}},"userIdentifier":{"type":"string"}}},"UserIdamStatusWithEmail":{"type":"object","properties":{"email":{"type":"string"},"idamStatus":{"type":"string"}}},"UserIdamStatusWithEmailResponse":{"type":"object","properties":{"userProfiles":{"type":"array","items":{"$ref":"#/components/schemas/UserIdamStatusWithEmail"}}}},"UserProfilesDeletionResponse":{"type":"object","properties":{"statusCode":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"UserEmail":{"type":"apiKey","name":"UserEmail","in":"header"},"ServiceAuthorization":{"type":"apiKey","description":"ServiceAuthorization","name":"ServiceAuthorization","in":"header","bearerFormat":"JWT"}}}}
