Class RelatedElementsResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/community-profile/users/{userId}")
    public class RelatedElementsResource
    extends Object
    The RelatedElementsResource provides a Spring based server-side REST API that supports the RelatedElementsManagementInterface. It delegates each request to the RelatedElementRESTServices. This provides the server-side implementation of the Community Profile Open Metadata Assess Service (OMAS) which is used to manage information about people, roles and organizations.
    • Constructor Detail

      • RelatedElementsResource

        public RelatedElementsResource()
        Default constructor
    • Method Detail

      • setupMoreInformation

        @PostMapping(path="/related-elements/{elementGUID}/more-information/{detailGUID}")
        public VoidResponse setupMoreInformation​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String elementGUID,
                                                 @PathVariable
                                                 String detailGUID,
                                                 @RequestBody
                                                 RelationshipRequestBody requestBody)
        Create a "MoreInformation" relationship between an element that is descriptive and one that is providing the detail.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element that is descriptive
        detailGUID - unique identifier of the element that provides the detail
        requestBody - relationship properties
        Returns:
        void 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)
      • clearMoreInformation

        @PostMapping(path="/related-elements/{elementGUID}/more-information/{detailGUID}/delete")
        public VoidResponse clearMoreInformation​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String elementGUID,
                                                 @PathVariable
                                                 String detailGUID,
                                                 @RequestBody
                                                 ExternalSourceRequestBody requestBody)
        Remove a "MoreInformation" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element that is descriptive
        detailGUID - unique identifier of the element that provides the detail
        requestBody - external source identifiers
        Returns:
        void 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)
      • getMoreInformation

        @GetMapping(path="/related-elements/more-information/by-descriptive-element/{elementGUID}")
        public RelatedElementListResponse getMoreInformation​(@PathVariable
                                                             String serverName,
                                                             @PathVariable
                                                             String userId,
                                                             @PathVariable
                                                             String elementGUID,
                                                             @RequestParam
                                                             int startFrom,
                                                             @RequestParam
                                                             int pageSize)
        Retrieve the detail elements linked via a "MoreInformation" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element that is descriptive
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • getDescriptiveElements

        @GetMapping(path="/related-elements/more-information/by-detail-element/{detailGUID}")
        public RelatedElementListResponse getDescriptiveElements​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @PathVariable
                                                                 String detailGUID,
                                                                 @RequestParam
                                                                 int startFrom,
                                                                 @RequestParam
                                                                 int pageSize)
        Retrieve the descriptive elements linked via a "MoreInformation" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        detailGUID - unique identifier of the element that provides the detail
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • setupStakeholder

        @PostMapping(path="/related-elements/{elementGUID}/stakeholders/{stakeholderGUID}")
        public VoidResponse setupStakeholder​(@PathVariable
                                             String serverName,
                                             @PathVariable
                                             String userId,
                                             @PathVariable
                                             String elementGUID,
                                             @PathVariable
                                             String stakeholderGUID,
                                             @RequestBody
                                             RelationshipRequestBody requestBody)
        Create a "Stakeholder" relationship between an element and its stakeholder.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        stakeholderGUID - unique identifier of the stakeholder
        requestBody - relationship properties
        Returns:
        void 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)
      • clearStakeholder

        @PostMapping(path="/related-elements/{elementGUID}/stakeholders/{stakeholderGUID}/delete")
        public VoidResponse clearStakeholder​(@PathVariable
                                             String serverName,
                                             @PathVariable
                                             String userId,
                                             @PathVariable
                                             String elementGUID,
                                             @PathVariable
                                             String stakeholderGUID,
                                             @RequestBody
                                             ExternalSourceRequestBody requestBody)
        Remove a "Stakeholder" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        stakeholderGUID - unique identifier of the stakeholder
        requestBody - external source identifiers
        Returns:
        void 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)
      • getStakeholders

        @GetMapping(path="/related-elements/stakeholders/by-commissioned-element/{elementGUID}")
        public RelatedElementListResponse getStakeholders​(@PathVariable
                                                          String serverName,
                                                          @PathVariable
                                                          String userId,
                                                          @PathVariable
                                                          String elementGUID,
                                                          @RequestParam
                                                          int startFrom,
                                                          @RequestParam
                                                          int pageSize)
        Retrieve the stakeholder elements linked via the "Stakeholder" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • getStakeholderCommissionedElements

        @GetMapping(path="/related-elements/stakeholders/by-stakeholder/{stakeholderGUID}")
        public RelatedElementListResponse getStakeholderCommissionedElements​(@PathVariable
                                                                             String serverName,
                                                                             @PathVariable
                                                                             String userId,
                                                                             @PathVariable
                                                                             String stakeholderGUID,
                                                                             @RequestParam
                                                                             int startFrom,
                                                                             @RequestParam
                                                                             int pageSize)
        Retrieve the elements commissioned by a stakeholder, linked via the "Stakeholder" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        stakeholderGUID - unique identifier of the stakeholder
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • setupAssignmentScope

        @PostMapping(path="/related-elements/{elementGUID}/assignment-scopes/{scopeGUID}")
        public VoidResponse setupAssignmentScope​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String elementGUID,
                                                 @PathVariable
                                                 String scopeGUID,
                                                 @RequestBody
                                                 RelationshipRequestBody requestBody)
        Create an "AssignmentScope" relationship between an element and its scope.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        scopeGUID - unique identifier of the scope
        requestBody - relationship properties
        Returns:
        void 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)
      • clearAssignmentScope

        @PostMapping(path="/related-elements/{elementGUID}/assignment-scopes/{scopeGUID}/delete")
        public VoidResponse clearAssignmentScope​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String elementGUID,
                                                 @PathVariable
                                                 String scopeGUID,
                                                 @RequestBody
                                                 ExternalSourceRequestBody requestBody)
        Remove an "AssignmentScope" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        scopeGUID - unique identifier of the scope
        requestBody - external source identifiers
        Returns:
        void 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)
      • getAssignedScopes

        @GetMapping(path="/related-elements/assignment-scopes/by-assigned-actor/{elementGUID}")
        public RelatedElementListResponse getAssignedScopes​(@PathVariable
                                                            String serverName,
                                                            @PathVariable
                                                            String userId,
                                                            @PathVariable
                                                            String elementGUID,
                                                            @RequestParam
                                                            int startFrom,
                                                            @RequestParam
                                                            int pageSize)
        Retrieve the assigned scopes linked by the "AssignmentScope" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • getAssignedActors

        @GetMapping(path="/related-elements/assignment-scopes/by-assigned-scope/{scopeGUID}")
        public RelatedElementListResponse getAssignedActors​(@PathVariable
                                                            String serverName,
                                                            @PathVariable
                                                            String userId,
                                                            @PathVariable
                                                            String scopeGUID,
                                                            @RequestParam
                                                            int startFrom,
                                                            @RequestParam
                                                            int pageSize)
        Retrieve the assigned actors linked by the "AssignmentScope" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        scopeGUID - unique identifier of the scope
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • setupResource

        @PostMapping(path="/related-elements/{elementGUID}/resource-list/{resourceGUID}")
        public VoidResponse setupResource​(@PathVariable
                                          String serverName,
                                          @PathVariable
                                          String userId,
                                          @PathVariable
                                          String elementGUID,
                                          @PathVariable
                                          String resourceGUID,
                                          @RequestBody
                                          RelationshipRequestBody requestBody)
        Create a "ResourceList" relationship between a consuming element and an element that represents resources.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        resourceGUID - unique identifier of the resource
        requestBody - relationship properties
        Returns:
        void 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)
      • clearResource

        @PostMapping(path="/related-elements/{elementGUID}/resource-list/{resourceGUID}/delete")
        public VoidResponse clearResource​(@PathVariable
                                          String serverName,
                                          @PathVariable
                                          String userId,
                                          @PathVariable
                                          String elementGUID,
                                          @PathVariable
                                          String resourceGUID,
                                          @RequestBody
                                          ExternalSourceRequestBody requestBody)
        Remove a "ResourceList" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        resourceGUID - unique identifier of the resource
        requestBody - external source identifiers
        Returns:
        void 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)
      • getResourceList

        @GetMapping(path="/related-elements/resource-list/by-assignee/{elementGUID}")
        public RelatedElementListResponse getResourceList​(@PathVariable
                                                          String serverName,
                                                          @PathVariable
                                                          String userId,
                                                          @PathVariable
                                                          String elementGUID,
                                                          @RequestParam
                                                          int startFrom,
                                                          @RequestParam
                                                          int pageSize)
        Retrieve the list of resources assigned to an element via the "ResourceList" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)
      • getSupportedByResource

        @GetMapping(path="/related-elements/resource-list/by-resource/{resourceGUID}")
        public RelatedElementListResponse getSupportedByResource​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @PathVariable
                                                                 String resourceGUID,
                                                                 @RequestParam
                                                                 int startFrom,
                                                                 @RequestParam
                                                                 int pageSize)
        Retrieve the list of elements assigned to a resource via the "ResourceList" relationship between two referenceables.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        resourceGUID - unique identifier of the resource
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        void 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)