Class MyProfileResource
java.lang.Object
org.odpi.openmetadata.viewservices.myprofile.server.spring.MyProfileResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/my-profile")
public class MyProfileResource
extends Object
The MyProfileResource provides part of the server-side implementation of the My Profile OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAction
(String serverName, ActionRequestBody requestBody) Create a new action and link it to the supplied actor and targets (if applicable).deleteAction
(String serverName, String actionGUID, DeleteRequestBody requestBody) Delete an existing action.findActions
(String serverName, ActivityStatusSearchString requestBody) Retrieve the "Actions" that match the search string.getActionByGUID
(String serverName, String actionGUID) Retrieve a "Action" by unique identifier.getActionsByCategory
(String serverName, ActivityStatusFilterRequestBody requestBody) Retrieve the actions that match the category name and status.getActionsForActionTarget
(String serverName, String elementGUID, ActivityStatusRequestBody requestBody) Retrieve the "Actions" that are chained off of an action target element.getActionsForSponsor
(String serverName, String elementGUID, ActivityStatusRequestBody requestBody) Retrieve the "Actions" that are chained off of a sponsor's element.getAssignedActions
(String serverName, String actorGUID, ActivityStatusRequestBody requestBody) Retrieve the "Actions" for a particular actor.getMyProfile
(String serverName) Return the profile for this user.reassignAction
(String serverName, String actionGUID, String actorGUID, UpdateRelationshipRequestBody requestBody) Assign a "Action" to a new actor.updateAction
(String serverName, String actionGUID, UpdateElementRequestBody requestBody) Update the properties associated with an action.updateActionTargetProperties
(String serverName, String actionTargetGUID, UpdateRelationshipRequestBody requestBody) Update the properties associated with an Action Target for a "Action".
-
Constructor Details
-
MyProfileResource
public MyProfileResource()Default constructor
-
-
Method Details
-
getMyProfile
@GetMapping(path="") public OpenMetadataRootElementResponse getMyProfile(@PathVariable String serverName) Return the profile for this user.- Parameters:
serverName
- name of the server instances for this request- Returns:
- profile response object or InvalidParameterException the userId is null or invalid or PropertyServerException there is a problem retrieving information from the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createAction
@PostMapping(path="/actions") public GUIDResponse createAction(@PathVariable String serverName, @RequestBody(required=false) ActionRequestBody requestBody) Create a new action and link it to the supplied actor and targets (if applicable).- Parameters:
serverName
- name of the server instances for this requestrequestBody
- properties of the action action- Returns:
- unique identifier of the action or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
updateAction
@PostMapping(path="/actions/{actionGUID}") public VoidResponse updateAction(@PathVariable String serverName, @PathVariable String actionGUID, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties associated with an action.- Parameters:
serverName
- name of the server instances for this requestactionGUID
- unique identifier of the actionrequestBody
- properties to change- Returns:
- void or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
updateActionTargetProperties
@PostMapping(path="/actions/action-targets/{actionTargetGUID}") public VoidResponse updateActionTargetProperties(@PathVariable String serverName, @PathVariable String actionTargetGUID, @RequestBody(required=false) UpdateRelationshipRequestBody requestBody) Update the properties associated with an Action Target for a "Action".- Parameters:
serverName
- name of the server instances for this requestactionTargetGUID
- unique identifier of the action target relationshiprequestBody
- properties to change- Returns:
- void or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
reassignAction
@PostMapping(path="/actions/{actionGUID}/reassign/{actorGUID}") public VoidResponse reassignAction(@PathVariable String serverName, @PathVariable String actionGUID, @PathVariable String actorGUID, @RequestBody(required=false) UpdateRelationshipRequestBody requestBody) Assign a "Action" to a new actor. This will unassign all other actors previously assigned to the action.- Parameters:
serverName
- name of the server instances for this requestactionGUID
- unique identifier of the actionactorGUID
- actor to assign the action torequestBody
- null request body- Returns:
- void or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
deleteAction
@PostMapping(path="/actions/{actionGUID}/delete") public VoidResponse deleteAction(@PathVariable String serverName, @PathVariable String actionGUID, @RequestBody(required=false) DeleteRequestBody requestBody) Delete an existing action.- Parameters:
serverName
- name of the server instances for this requestactionGUID
- unique identifier of the actionrequestBody
- null request body- Returns:
- void or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
getActionByGUID
@GetMapping(path="/actions/{actionGUID}") public OpenMetadataRootElementResponse getActionByGUID(@PathVariable String serverName, @PathVariable String actionGUID) Retrieve a "Action" by unique identifier.- Parameters:
serverName
- name of the server instances for this requestactionGUID
- unique identifier of the action- Returns:
- action bean or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
getActionsForActionTarget
@PostMapping(path="/elements/{elementGUID}/action-targets/actions") public OpenMetadataRootElementsResponse getActionsForActionTarget(@PathVariable String serverName, @PathVariable String elementGUID, @RequestBody(required=false) ActivityStatusRequestBody requestBody) Retrieve the "Actions" that are chained off of an action target element.- Parameters:
serverName
- name of the server instances for this requestelementGUID
- unique identifier of the element to start withrequestBody
- status of the action (null means current active)- Returns:
- list of action beans or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
getActionsForSponsor
@PostMapping(path="/elements/{elementGUID}/sponsored/actions") public OpenMetadataRootElementsResponse getActionsForSponsor(@PathVariable String serverName, @PathVariable String elementGUID, @RequestBody(required=false) ActivityStatusRequestBody requestBody) Retrieve the "Actions" that are chained off of a sponsor's element.- Parameters:
serverName
- name of the server instances for this requestelementGUID
- unique identifier of the element to start withrequestBody
- status of the action (null means current active)- Returns:
- list of action beans or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
getAssignedActions
@PostMapping(path="/actors/{actorGUID}/assigned/actions") public OpenMetadataRootElementsResponse getAssignedActions(@PathVariable String serverName, @PathVariable String actorGUID, @RequestBody(required=false) ActivityStatusRequestBody requestBody) Retrieve the "Actions" for a particular actor.- Parameters:
serverName
- name of the server instances for this requestactorGUID
- unique identifier of the rolerequestBody
- status of the action (null means current active)- Returns:
- list of action beans or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
findActions
@PostMapping(path="/actions/find-by-search-string") public OpenMetadataRootElementsResponse findActions(@PathVariable String serverName, @RequestBody(required=false) ActivityStatusSearchString requestBody) Retrieve the "Actions" that match the search string.- Parameters:
serverName
- name of the server instances for this requestrequestBody
- status of the action (null means current active)- Returns:
- list of action beans or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-
getActionsByCategory
@PostMapping(path="/actions/by-category") public OpenMetadataRootElementsResponse getActionsByCategory(@PathVariable String serverName, @RequestBody(required=false) ActivityStatusFilterRequestBody requestBody) Retrieve the actions that match the category name and status.- Parameters:
serverName
- name of the server instances for this requestrequestBody
- status of the action (null means current active)- Returns:
- list of action beans or InvalidParameterException a parameter is invalid PropertyServerException the server is not available UserNotAuthorizedException the calling user is not authorized to issue the call
-