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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelEngineAction(String serverName, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is stopped.getActiveEngineActions(String serverName, String userId, int startFrom, int pageSize) Retrieve the engine actions that are still in process.getEngineAction(String serverName, String userId, String engineActionGUID) Request the status and properties of an executing engine action request.getGovernanceActionProcessGraph(String serverName, String userId, String processGUID, ResultsRequestBody requestBody) Retrieve the governance action process metadata element with the supplied unique identifier along with the flow definition describing its implementation.initiateEngineAction(String serverName, String userId, String governanceEngineName, InitiateEngineActionRequestBody requestBody) Create an engine action in the metadata store that will trigger the governance service associated with the supplied request type.initiateGovernanceActionProcess(String serverName, String userId, InitiateGovernanceActionProcessRequestBody requestBody) Using the named governance action process as a template, initiate a chain of engine actions.initiateGovernanceActionType(String serverName, String userId, InitiateGovernanceActionTypeRequestBody requestBody) Using the named governance action process as a template, initiate a chain of engine actions.
-
Constructor Details
-
OpenGovernanceResource
public OpenGovernanceResource()
-
-
Method Details
-
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 touserId- calling userprocessGUID- 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 there is 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 touserId- caller's userIdgovernanceEngineName- name of the governance engine that should execute the requestrequestBody- 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 there is 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 touserId- caller's userIdrequestBody- 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 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 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 touserId- caller's userIdrequestBody- 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 there is 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 touserId- identifier of calling userengineActionGUID- 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 touserId- identifier of calling userengineActionGUID- 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 touserId- userId of callerstartFrom- starting from elementpageSize- 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.
-