Class OpenGovernanceResource
java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.server.spring.OpenGovernanceResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/{serviceURLMarker}/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 serviceURLMarker, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is stopped.findEngineActions
(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of engine action metadata elements that contain the search string.getActiveEngineActions
(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are still in process.getEngineAction
(String serverName, String serviceURLMarker, String userId, String engineActionGUID) Request the status and properties of an executing engine action request.getEngineActions
(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are known to the server.getEngineActionsByName
(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of engine action metadata elements with a matching qualified or display name.getGovernanceActionProcessGraph
(String serverName, String serviceURLMarker, 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 serviceURLMarker, 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 serviceURLMarker, String userId, InitiateGovernanceActionProcessRequestBody requestBody) Using the named governance action process as a template, initiate a chain of engine actions.initiateGovernanceActionType
(String serverName, String serviceURLMarker, String userId, InitiateGovernanceActionTypeRequestBody requestBody) Using the named governance action process as a template, initiate a chain of engine actions.linkConsolidatedDuplicate
(String serverName, String serviceURLMarker, String userId, ConsolidatedDuplicatesRequestBody requestBody) Create a relationship between two elements that shows that one is a combination of a number of duplicates, and it should be used instead.linkElementsAsPeerDuplicates
(String serverName, String serviceURLMarker, String userId, PeerDuplicatesRequestBody requestBody) Create a relationship between two elements that show they represent the same "thing".
-
Constructor Details
-
OpenGovernanceResource
public OpenGovernanceResource()
-
-
Method Details
-
getGovernanceActionProcessGraph
@PostMapping(path="/governance-action-processes/{processGUID}/graph") public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(@PathVariable String serverName, @PathVariable String serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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 serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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 serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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 serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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 serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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 serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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.
-
getEngineActions
@GetMapping(path="/engine-actions") public EngineActionElementsResponse getEngineActions(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestParam(required=false) int startFrom, @RequestParam(required=false) int pageSize) Retrieve the engine actions that are known to the server.- Parameters:
serverName
- name of server instance to route request toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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.
-
getActiveEngineActions
@GetMapping(path="/engine-actions/active") public EngineActionElementsResponse getActiveEngineActions(@PathVariable String serverName, @PathVariable String serviceURLMarker, @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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- 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.
-
findEngineActions
@PostMapping(path="/engine-actions/by-search-string") public EngineActionElementsResponse findEngineActions(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestParam(required=false) int startFrom, @RequestParam(required=false) int pageSize, @RequestBody SearchStringRequestBody requestBody) Retrieve the list of engine 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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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)
-
getEngineActionsByName
@PostMapping(path="/engine-actions/by-name") public EngineActionElementsResponse getEngineActionsByName(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestParam(required=false) int startFrom, @RequestParam(required=false) int pageSize, @RequestBody NameRequestBody requestBody) Retrieve the list of engine 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 toserviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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)
-
linkElementsAsPeerDuplicates
@PostMapping(path="/related-elements/link-as-peer-duplicate") public VoidResponse linkElementsAsPeerDuplicates(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestBody PeerDuplicatesRequestBody requestBody) Create a relationship between two elements that show they represent the same "thing". If the relationship already exists, the properties are updated.- Parameters:
serverName
- name of the service to route the request to.serviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- calling userrequestBody
- 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="/related-elements/link-as-consolidated-duplicate") public VoidResponse linkConsolidatedDuplicate(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestBody ConsolidatedDuplicatesRequestBody requestBody) Create a relationship between two elements that shows that one is a combination of a number of duplicates, and it should be used instead. If the relationship already exists, the properties are updated.- Parameters:
serverName
- name of the service to route the request to.serviceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId
- calling userrequestBody
- 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
-