Class GovernanceEngineOMASResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-engine/users/{userId}")
    public class GovernanceEngineOMASResource
    extends Object
    GovernanceEngineOMASResource supports the REST APIs for running Governance Action Service
    • Constructor Detail

      • GovernanceEngineOMASResource

        public GovernanceEngineOMASResource()
    • Method Detail

      • getOutTopicConnection

        @GetMapping(path="/topics/out-topic-connection/{callerId}")
        public ConnectionResponse getOutTopicConnection​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @PathVariable
                                                        String callerId)
        Return the connection object for the Governance Engine OMAS's out topic.
        Parameters:
        serverName - name of the service to route the request to.
        userId - identifier of calling user.
        callerId - unique identifier of the caller
        Returns:
        connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the topic connection.
      • logAssetAuditMessage

        @PostMapping(path="/assets/{assetGUID}/log-records/{governanceService}")
        public VoidResponse logAssetAuditMessage​(@PathVariable
                                                 String serverName,
                                                 @PathVariable
                                                 String userId,
                                                 @PathVariable
                                                 String assetGUID,
                                                 @PathVariable
                                                 String governanceService,
                                                 @RequestBody
                                                 String message)
        Log an audit message about an asset.
        Parameters:
        serverName - name of server instance to route request to
        userId - userId of user making request.
        assetGUID - unique identifier for asset.
        governanceService - unique name for governance service.
        message - message to log
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem that occurred within the property server.
      • updateActionTargetStatus

        @PostMapping(path="/governance-actions/action-targets/update")
        public VoidResponse updateActionTargetStatus​(@PathVariable
                                                     String serverName,
                                                     @PathVariable
                                                     String userId,
                                                     @RequestBody
                                                     ActionTargetStatusRequestBody requestBody)
        Update the status of a specific action target. By default, these values are derived from the values for the governance action service. However, if the governance action service has to process name target elements, then setting the status on each individual target will show the progress of the governance action service.
        Parameters:
        serverName - name of server instance to route request to
        userId - caller's userId
        requestBody - relationship properties
        Returns:
        void or InvalidParameterException the action target GUID is not recognized UserNotAuthorizedException the governance action service is not authorized to update the action target properties PropertyServerException there is a problem connecting to the metadata store
      • updateGovernanceActionStatus

        @PostMapping(path="/governance-actions/{governanceActionGUID}/status/update")
        public VoidResponse updateGovernanceActionStatus​(@PathVariable
                                                         String serverName,
                                                         @PathVariable
                                                         String userId,
                                                         @PathVariable
                                                         String governanceActionGUID,
                                                         @RequestBody
                                                         StatusRequestBody requestBody)
        Update the status of the governance action - providing the caller is permitted.
        Parameters:
        serverName - name of server instance to route request to
        userId - identifier of calling user
        governanceActionGUID - identifier of the governance action request
        requestBody - new status ordinal
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • recordCompletionStatus

        @PostMapping(path="/governance-actions/{governanceActionGUID}/completion-status")
        public VoidResponse recordCompletionStatus​(@PathVariable
                                                   String serverName,
                                                   @PathVariable
                                                   String userId,
                                                   @PathVariable
                                                   String governanceActionGUID,
                                                   @RequestBody
                                                   CompletionStatusRequestBody requestBody)
        Declare that all the processing for the governance action service is finished and the status of the work.
        Parameters:
        serverName - name of server instance to route request to
        userId - caller's userId
        governanceActionGUID - unique identifier of the governance action to update
        requestBody - completion status enum value, optional guard strings for triggering subsequent action(s) plus a list of additional elements to add to the action targets for the next phase
        Returns:
        void or InvalidParameterException the completion status is null UserNotAuthorizedException the governance action service is not authorized to update the governance action service status PropertyServerException there is a problem connecting to the metadata store
      • initiateGovernanceAction

        @PostMapping(path="/governance-engines/{governanceEngineName}/governance-actions/initiate")
        public GUIDResponse initiateGovernanceAction​(@PathVariable
                                                     String serverName,
                                                     @PathVariable
                                                     String userId,
                                                     @PathVariable
                                                     String governanceEngineName,
                                                     @RequestBody
                                                     GovernanceActionRequestBody requestBody)
        Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type. The governance action remains to act as a record of the actions taken for auditing.
        Parameters:
        serverName - name of server instance to route request to
        userId - caller's userId
        governanceEngineName - name of the governance engine that should execute the request
        requestBody - properties for the governance action and to pass to the governance action service
        Returns:
        unique identifier of the governance action or InvalidParameterException null qualified name UserNotAuthorizedException this governance action service is not authorized to create a governance action PropertyServerException there is a problem with the metadata store
      • initiateGovernanceActionProcess

        @PostMapping(path="/governance-action-processes/initiate")
        public GUIDResponse initiateGovernanceActionProcess​(@PathVariable
                                                            String serverName,
                                                            @PathVariable
                                                            String userId,
                                                            @RequestBody
                                                            GovernanceActionProcessRequestBody requestBody)
        Using the named governance action process as a template, initiate a chain of governance actions.
        Parameters:
        serverName - name of server instance to route request to
        userId - caller's userId
        requestBody - properties to initiate the new instance of the process
        Returns:
        unique identifier of the first governance action of the process or InvalidParameterException null or unrecognized qualified name of the process UserNotAuthorizedException this governance action service is not authorized to create a governance action process PropertyServerException there is a problem with the metadata store
      • linkElementsAsPeerDuplicates

        @PostMapping(path="/open-metadata-store/related-elements/link-as-peer-duplicate")
        public VoidResponse linkElementsAsPeerDuplicates​(@PathVariable
                                                         String serverName,
                                                         @PathVariable
                                                         String userId,
                                                         @RequestBody
                                                         PeerDuplicatesRequestBody requestBody)
        Create a simple relationship between two elements. If the relationship already exists, the properties are updated.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - parameters for the relationship
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • linkConsolidatedDuplicate

        @PostMapping(path="/open-metadata-store/related-elements/link-as-consolidated-duplicate")
        public VoidResponse linkConsolidatedDuplicate​(@PathVariable
                                                      String serverName,
                                                      @PathVariable
                                                      String userId,
                                                      @RequestBody
                                                      ConsolidatedDuplicatesRequestBody requestBody)
        Create a simple relationship between two elements. If the relationship already exists, the properties are updated.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - parameters for the relationship
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getGovernanceAction

        @GetMapping(path="/governance-actions/{governanceActionGUID}")
        public GovernanceActionElementResponse getGovernanceAction​(@PathVariable
                                                                   String serverName,
                                                                   @PathVariable
                                                                   String userId,
                                                                   @PathVariable
                                                                   String governanceActionGUID)
        Request the status and properties of an executing governance action request.
        Parameters:
        serverName - name of server instance to route request to
        userId - identifier of calling user
        governanceActionGUID - identifier of the governance action request.
        Returns:
        governance action properties and status or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • claimGovernanceAction

        @PostMapping(path="/governance-actions/{governanceActionGUID}/claim")
        public VoidResponse claimGovernanceAction​(@PathVariable
                                                  String serverName,
                                                  @PathVariable
                                                  String userId,
                                                  @PathVariable
                                                  String governanceActionGUID,
                                                  @RequestBody(required=false)
                                                  NullRequestBody requestBody)
        Request that execution of a governance action is allocated to the caller.
        Parameters:
        serverName - name of server instance to route request to
        userId - identifier of calling user
        governanceActionGUID - identifier of the governance action request.
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • getGovernanceActions

        @GetMapping(path="/governance-actions")
        public GovernanceActionElementsResponse getGovernanceActions​(@PathVariable
                                                                     String serverName,
                                                                     @PathVariable
                                                                     String userId,
                                                                     @RequestParam
                                                                     int startFrom,
                                                                     @RequestParam
                                                                     int pageSize)
        Retrieve the governance actions that are known to the server.
        Parameters:
        serverName - name of server instance to route request to
        userId - userId of caller
        startFrom - starting from element
        pageSize - maximum elements to return
        Returns:
        list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • getActiveGovernanceActions

        @GetMapping(path="/governance-actions/active")
        public GovernanceActionElementsResponse getActiveGovernanceActions​(@PathVariable
                                                                           String serverName,
                                                                           @PathVariable
                                                                           String userId,
                                                                           @RequestParam
                                                                           int startFrom,
                                                                           @RequestParam
                                                                           int pageSize)
        Retrieve the governance actions that are still in process.
        Parameters:
        serverName - name of server instance to route request to
        userId - userId of caller
        startFrom - starting from element
        pageSize - maximum elements to return
        Returns:
        list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • getActiveClaimedGovernanceActions

        @GetMapping(path="/governance-engines/{governanceEngineGUID}/active-governance-actions")
        public GovernanceActionElementsResponse getActiveClaimedGovernanceActions​(@PathVariable
                                                                                  String serverName,
                                                                                  @PathVariable
                                                                                  String userId,
                                                                                  @PathVariable
                                                                                  String governanceEngineGUID,
                                                                                  @RequestParam
                                                                                  int startFrom,
                                                                                  @RequestParam
                                                                                  int pageSize)
        Retrieve the governance actions that are still in process and that have been claimed by this caller's userId. This call is used when the caller restarts.
        Parameters:
        serverName - name of server instance to route request to
        userId - userId of caller
        governanceEngineGUID - unique identifier of governance engine
        startFrom - starting from element
        pageSize - maximum elements to return
        Returns:
        list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
      • findGovernanceActions

        @PostMapping(path="/governance-actions/by-search-string")
        public GovernanceActionElementsResponse findGovernanceActions​(@PathVariable
                                                                      String serverName,
                                                                      @PathVariable
                                                                      String userId,
                                                                      @RequestParam
                                                                      int startFrom,
                                                                      @RequestParam
                                                                      int pageSize,
                                                                      @RequestBody
                                                                      SearchStringRequestBody requestBody)
        Retrieve the list of governance action metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to
        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)
      • getGovernanceActionsByName

        @PostMapping(path="/governance-actions/by-name")
        public GovernanceActionElementsResponse getGovernanceActionsByName​(@PathVariable
                                                                           String serverName,
                                                                           @PathVariable
                                                                           String userId,
                                                                           @RequestParam
                                                                           int startFrom,
                                                                           @RequestParam
                                                                           int pageSize,
                                                                           @RequestBody
                                                                           NameRequestBody requestBody)
        Retrieve the list of governance action metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to
        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 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)