Class ITProfileResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/it-infrastructure/users/{userId}")
    public class ITProfileResource
    extends Object
    The ITProfileResource provides a Spring based server-side REST API that supports the ITProfileManagerInterface. It delegates each request to the OrganizationRESTServices. This provides the server-side implementation of the IT Infrastructure Open Metadata Assess Service (OMAS) which is used to manage information about IT profiles and their userIds.
    • Constructor Detail

      • ITProfileResource

        public ITProfileResource()
        Default constructor
    • Method Detail

      • createITProfile

        @PostMapping(path="/profiles")
        public GUIDResponse createITProfile​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @RequestBody
                                            ITProfileRequestBody requestBody)
        Create a definition of a IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        requestBody - properties for a IT profile
        Returns:
        unique identifier of IT profile InvalidParameterException qualifiedName or userId is null; qualifiedName is not unique PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • updateITProfile

        @PostMapping(path="/profiles/{itProfileGUID}")
        public VoidResponse updateITProfile​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @PathVariable
                                            String itProfileGUID,
                                            @RequestParam
                                            boolean isMergeUpdate,
                                            @RequestBody
                                            ITProfileRequestBody requestBody)
        Update the definition of an IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        itProfileGUID - unique identifier of IT profile
        isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
        requestBody - properties to change
        Returns:
        void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • deleteITProfile

        @PostMapping(path="/profiles/{itProfileGUID}/delete")
        public VoidResponse deleteITProfile​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @PathVariable
                                            String itProfileGUID,
                                            @RequestBody
                                            MetadataSourceRequestBody requestBody)
        Remove the definition of an IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        itProfileGUID - unique identifier of IT profile
        requestBody - identifiers of the software server capability entity that represented the external source - null for local
        Returns:
        void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • addContactMethod

        @PostMapping(path="/profiles/{itProfileGUID}/contact-methods")
        public GUIDResponse addContactMethod​(@PathVariable
                                             String serverName,
                                             @PathVariable
                                             String userId,
                                             @PathVariable
                                             String itProfileGUID,
                                             @RequestBody
                                             ContactMethodRequestBody requestBody)
        Add a new contact method to the profile.
        Parameters:
        serverName - called server
        userId - the name of the calling user.
        itProfileGUID - identifier of the profile to update.
        requestBody - properties of contact method.
        Returns:
        unique identifier (guid) for the new contact method. InvalidParameterException the userId is null or invalid. Another property is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • deleteContactMethod

        @PostMapping(path="/profiles/contact-methods/{contactMethodGUID}/delete")
        public VoidResponse deleteContactMethod​(@PathVariable
                                                String serverName,
                                                @PathVariable
                                                String userId,
                                                @PathVariable
                                                String contactMethodGUID,
                                                @RequestBody
                                                MetadataSourceRequestBody requestBody)
        Remove an obsolete contact method from the profile.
        Parameters:
        serverName - called server
        userId - the name of the calling user.
        contactMethodGUID - unique identifier (guid) for the obsolete contact method.
        requestBody - identifiers of the software server capability entity that represented the external source - null for local
        Returns:
        void or InvalidParameterException the userId is null or invalid. Another property is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • getITProfileByGUID

        @GetMapping(path="/profiles/{itProfileGUID}")
        public ITProfileResponse getITProfileByGUID​(@PathVariable
                                                    String serverName,
                                                    @PathVariable
                                                    String userId,
                                                    @PathVariable
                                                    String itProfileGUID)
        Return information about a specific IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        itProfileGUID - unique identifier for the IT profile
        Returns:
        properties of the IT profile InvalidParameterException itProfileGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getITProfileByUserId

        @GetMapping(path="/profiles/user-ids/{itProfileUserId}")
        public ITProfileResponse getITProfileByUserId​(@PathVariable
                                                      String serverName,
                                                      @PathVariable
                                                      String userId,
                                                      @PathVariable
                                                      String itProfileUserId)
        Return information about a specific IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        itProfileUserId - unique identifier for the IT profile
        Returns:
        properties of the IT profile InvalidParameterException itProfileUserId or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getITProfileByName

        @PostMapping(path="/profiles/by-name")
        public ITProfileListResponse getITProfileByName​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @RequestParam
                                                        int startFrom,
                                                        @RequestParam
                                                        int pageSize,
                                                        @RequestBody
                                                        NameRequestBody requestBody)
        Return information about a named IT profile.
        Parameters:
        serverName - called server
        userId - calling user
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        requestBody - unique name for the IT profile
        Returns:
        list of matching IT profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • findITProfile

        @PostMapping(path="/profiles/by-search-string")
        public ITProfileListResponse findITProfile​(@PathVariable
                                                   String serverName,
                                                   @PathVariable
                                                   String userId,
                                                   @RequestParam
                                                   int startFrom,
                                                   @RequestParam
                                                   int pageSize,
                                                   @RequestBody
                                                   SearchStringRequestBody requestBody)
        Retrieve the list of matching profiles for the search string.
        Parameters:
        serverName - called server
        userId - the name of the calling user.
        requestBody - RegEx string to search for
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        list of matching IT profiles InvalidParameterException guid invalid or the external references are not correctly specified, or are null. PropertyServerException the server is not available. UserNotAuthorizedException the calling user is not authorized to issue the call.
      • createUserIdentity

        @PostMapping(path="/user-identities")
        public GUIDResponse createUserIdentity​(@PathVariable
                                               String serverName,
                                               @PathVariable
                                               String userId,
                                               @RequestBody
                                               UserIdentityRequestBody requestBody)
        Create a UserIdentity. This is not connected to a profile.
        Parameters:
        serverName - name of target server
        userId - the name of the calling user.
        requestBody - userId for the new userIdentity.
        Returns:
        guid or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • updateUserIdentity

        @PostMapping(path="/user-identities/{userIdentityGUID}")
        public VoidResponse updateUserIdentity​(@PathVariable
                                               String serverName,
                                               @PathVariable
                                               String userId,
                                               @PathVariable
                                               String userIdentityGUID,
                                               @RequestParam
                                               boolean isMergeUpdate,
                                               @RequestBody
                                               UserIdentityRequestBody requestBody)
        Update a UserIdentity.
        Parameters:
        serverName - name of target server
        userId - the name of the calling user
        userIdentityGUID - unique identifier of the UserIdentity
        isMergeUpdate - should the supplied properties be overlaid on the existing properties (true) or replace them (false
        requestBody - updated properties for the new userIdentity
        Returns:
        void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • deleteUserIdentity

        @PostMapping(path="/user-identities/{userIdentityGUID}/delete")
        public VoidResponse deleteUserIdentity​(@PathVariable
                                               String serverName,
                                               @PathVariable
                                               String userId,
                                               @PathVariable
                                               String userIdentityGUID,
                                               @RequestBody
                                               MetadataSourceRequestBody requestBody)
        Remove a user identity object. This will fail if a profile would be left without an associated user identity.
        Parameters:
        serverName - name of target server
        userId - the name of the calling user.
        userIdentityGUID - unique identifier of the UserIdentity
        requestBody - external source identifiers
        Returns:
        void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • addIdentityToProfile

        @PostMapping(path="/user-identities/{userIdentityGUID}/personal-profiles/{profileGUID}/link")
        public VoidResponse addIdentityToProfile​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String userIdentityGUID,
                                                 @PathVariable
                                                 String profileGUID,
                                                 @RequestBody
                                                 MetadataSourceRequestBody requestBody)
        Link a user identity to a profile. This will fail if the user identity is already connected to a profile.
        Parameters:
        serverName - name of target server
        userId - the name of the calling user.
        userIdentityGUID - unique identifier of the UserIdentity
        profileGUID - the profile to add the identity to.
        requestBody - external source identifiers
        Returns:
        void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • removeIdentityFromProfile

        @PostMapping(path="/user-identities/{userIdentityGUID}/profiles/{profileGUID}/unlink")
        public VoidResponse removeIdentityFromProfile​(@PathVariable
                                                      String serverName,
                                                      @PathVariable
                                                      String userId,
                                                      @PathVariable
                                                      String userIdentityGUID,
                                                      @PathVariable
                                                      String profileGUID,
                                                      @RequestBody
                                                      MetadataSourceRequestBody requestBody)
        Remove a user identity object. This will fail if the profile would be left without an associated user identity.
        Parameters:
        serverName - name of target server
        userId - the name of the calling user.
        userIdentityGUID - unique identifier of the UserIdentity
        profileGUID - the profile to add the identity to.
        requestBody - external source identifiers
        Returns:
        void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • findUserIdentities

        @PostMapping(path="/user-identities/by-search-string")
        public UserIdentityListResponse findUserIdentities​(@PathVariable
                                                           String serverName,
                                                           @PathVariable
                                                           String userId,
                                                           @RequestParam
                                                           int startFrom,
                                                           @RequestParam
                                                           int pageSize,
                                                           @RequestBody
                                                           SearchStringRequestBody requestBody)
        Retrieve the list of user identity metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of target server
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - string to find in the properties
        Returns:
        list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
      • getUserIdentitiesByName

        @PostMapping(path="/user-identities/by-name")
        public UserIdentityListResponse getUserIdentitiesByName​(@PathVariable
                                                                String serverName,
                                                                @PathVariable
                                                                String userId,
                                                                @RequestParam
                                                                int startFrom,
                                                                @RequestParam
                                                                int pageSize,
                                                                @RequestBody
                                                                NameRequestBody requestBody)
        Retrieve the list of user identity metadata elements with a matching qualified name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of target server
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - name to search for
        Returns:
        list of matching metadata elements InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
      • getUserIdentityByGUID

        @GetMapping(path="/user-identities/{userIdentityGUID}")
        public UserIdentityResponse getUserIdentityByGUID​(@PathVariable
                                                          String serverName,
                                                          @PathVariable
                                                          String userId,
                                                          @PathVariable
                                                          String userIdentityGUID)
        Retrieve the userIdentity metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of target server
        userId - calling user
        userIdentityGUID - unique identifier of the requested metadata element
        Returns:
        matching metadata element or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)