Class OpenGovernanceResource

java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.server.spring.OpenGovernanceResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/open-governance-service/users/{userId}") public class OpenGovernanceResource extends Object
OpenGovernanceResource supports the REST APIs for common governance functions.
  • Constructor Details

    • OpenGovernanceResource

      public OpenGovernanceResource()
  • Method Details

    • getOutTopicConnection

      @GetMapping(path="/topics/out-topic-connection/{callerId}") public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String callerId)
      Return the connection object for the Open Metadata Store's out topic.
      Parameters:
      serverName - name of the server to route the request to
      userId - identifier of calling user
      callerId - unique identifier for 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 discovery engine definition.
    • getGovernanceActionProcessGraph

      @PostMapping(path="/governance-action-processes/{processGUID}/graph") public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(@PathVariable String serverName, @PathVariable String userId, @PathVariable String processGUID, @RequestBody(required=false) ResultsRequestBody requestBody)
      Retrieve the governance action process metadata element with the supplied unique identifier along with the flow definition describing its implementation.
      Parameters:
      serverName - name of the service to route the request to
      userId - calling user
      processGUID - unique identifier of the requested metadata element
      Returns:
      requested metadata element or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
    • initiateEngineAction

      @PostMapping(path="/governance-engines/{governanceEngineName}/engine-actions/initiate") public GUIDResponse initiateEngineAction(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceEngineName, @RequestBody InitiateEngineActionRequestBody requestBody)
      Create an engine action in the metadata store that will trigger the governance service associated with the supplied request type. The engine 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 engine action and to pass to the governance service
      Returns:
      unique identifier of the engine action or InvalidParameterException null qualified name UserNotAuthorizedException the caller is not authorized to create an engine action PropertyServerException a problem with the metadata store
    • initiateGovernanceActionType

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

      @PostMapping(path="/governance-action-processes/initiate") public GUIDResponse initiateGovernanceActionProcess(@PathVariable String serverName, @PathVariable String userId, @RequestBody InitiateGovernanceActionProcessRequestBody requestBody)
      Using the named governance action process as a template, initiate a chain of engine 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 governance action process instance or InvalidParameterException null or unrecognized qualified name of the process UserNotAuthorizedException the caller is not authorized to create a governance action process PropertyServerException a problem with the metadata store
    • getEngineAction

      @GetMapping(path="/engine-actions/{engineActionGUID}") public EngineActionElementResponse getEngineAction(@PathVariable String serverName, @PathVariable String userId, @PathVariable String engineActionGUID)
      Request the status and properties of an executing engine action request.
      Parameters:
      serverName - name of server instance to route request to
      userId - identifier of calling user
      engineActionGUID - identifier of the engine action request.
      Returns:
      engine 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.
    • cancelEngineAction

      @PostMapping(path="/engine-actions/{engineActionGUID}/cancel") public VoidResponse cancelEngineAction(@PathVariable String serverName, @PathVariable String userId, @PathVariable String engineActionGUID, @RequestBody(required=false) NullRequestBody requestBody)
      Request that execution of an engine action is stopped.
      Parameters:
      serverName - name of server instance to route request to
      userId - identifier of calling user
      engineActionGUID - identifier of the engine 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.
    • getActiveEngineActions

      @GetMapping(path="/engine-actions/active") public EngineActionElementsResponse getActiveEngineActions(@PathVariable String serverName, @PathVariable String userId, @RequestParam(required=false) int startFrom, @RequestParam(required=false) int pageSize)
      Retrieve the engine 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 engine 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.