Class MetadataExplorerResource
java.lang.Object
org.odpi.openmetadata.viewservices.metadataexplorer.server.spring.MetadataExplorerResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/{urlMarker}")
public class MetadataExplorerResource
extends Object
The MetadataExplorerResource provides part of the server-side implementation of the Metadata Explorer OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindElementsForAnchor
(String serverName, String urlMarker, String anchorGUID, SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description.findElementsInAnchorDomain
(String serverName, String urlMarker, String anchorDomainName, SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description.findElementsInAnchorScope
(String serverName, String urlMarker, String anchorScopeGUID, SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description.findMetadataElements
(String serverName, String urlMarker, FindRequestBody requestBody) Return a list of metadata elements that match the supplied criteria.findMetadataElementsWithString
(String serverName, String urlMarker, SearchStringRequestBody requestBody) Retrieve the metadata elements that contain the requested string.findRelationshipsBetweenMetadataElements
(String serverName, String urlMarker, FindRelationshipRequestBody requestBody) Return a list of relationships that match the requested conditions.getAllMetadataElementRelationships
(String serverName, String metadataElementAtEnd1GUID, String metadataElementAtEnd2GUID, String urlMarker, ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements.getAllRelatedMetadataElements
(String serverName, String elementGUID, String urlMarker, int startingAtEnd, ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element.getAnchoredElementsGraph
(String serverName, String urlMarker, String elementGUID, ResultsRequestBody requestBody) Return all the elements that are anchored to an element plus relationships between these elements and to other elements.getMetadataElementByGUID
(String serverName, String elementGUID, String urlMarker, GetRequestBody requestBody) Retrieve the metadata element using its unique identifier.getMetadataElementByUniqueName
(String serverName, String urlMarker, UniqueNameRequestBody requestBody) Retrieve the metadata element using its unique name (typically the qualified name).getMetadataElementGUIDByUniqueName
(String serverName, String urlMarker, UniqueNameRequestBody requestBody) Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).getMetadataElementHistory
(String serverName, String elementGUID, String urlMarker, HistoryRequestBody requestBody) Retrieve all the versions of an element.getMetadataElementRelationships
(String serverName, String metadataElementAtEnd1GUID, String relationshipTypeName, String metadataElementAtEnd2GUID, String urlMarker, ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements via a specific type of relationship.getRelatedMetadataElements
(String serverName, String elementGUID, String relationshipTypeName, String urlMarker, int startingAtEnd, ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element via a specific relationship type.getRelationshipByGUID
(String serverName, String relationshipGUID, String urlMarker, GetRequestBody requestBody) Retrieve the relationship using its unique identifier.getRelationshipHistory
(String serverName, String relationshipGUID, String urlMarker, HistoryRequestBody requestBody) Retrieve all the versions of a relationship.
-
Constructor Details
-
MetadataExplorerResource
public MetadataExplorerResource()Default constructor
-
-
Method Details
-
getMetadataElementByGUID
@PostMapping(path="/metadata-elements/{elementGUID}") public OpenMetadataElementResponse getMetadataElementByGUID(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String urlMarker, @RequestBody(required=false) GetRequestBody requestBody) Retrieve the metadata element using its unique identifier.- Parameters:
serverName
- name of server instance to route request toelementGUID
- unique identifier for the metadata elementurlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- metadata element properties or InvalidParameterException the unique identifier is null or not known. UserNotAuthorizedException the governance action service is not able to access the element PropertyServerException there is a problem accessing the metadata store
-
getMetadataElementByUniqueName
@PostMapping(path="/metadata-elements/by-unique-name") public OpenMetadataElementResponse getMetadataElementByUniqueName(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody UniqueNameRequestBody requestBody) Retrieve the metadata element using its unique name (typically the qualified name).- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrequestBody
- unique name for the metadata element- Returns:
- metadata element properties or InvalidParameterException the unique identifier is null or not known. UserNotAuthorizedException the governance action service is not able to access the element PropertyServerException there is a problem accessing the metadata store
-
getMetadataElementGUIDByUniqueName
@PostMapping(path="/metadata-elements/guid-by-unique-name") public GUIDResponse getMetadataElementGUIDByUniqueName(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody UniqueNameRequestBody requestBody) Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrequestBody
- unique name for the metadata element- Returns:
- metadata element unique identifier (guid) or InvalidParameterException the unique identifier is null or not known or UserNotAuthorizedException the governance action service is not able to access the element or PropertyServerException there is a problem accessing the metadata store
-
getMetadataElementHistory
@PostMapping(path="/metadata-elements/{elementGUID}/history") public OpenMetadataElementsResponse getMetadataElementHistory(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String urlMarker, @RequestBody(required=false) HistoryRequestBody requestBody) Retrieve all the versions of an element.- Parameters:
serverName
- name of the server to route the request toelementGUID
- unique identifier of object to retrieveurlMarker
- view service URL markerrequestBody
- the time window required- Returns:
- list of beans or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem removing the properties from the repositories. UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
findMetadataElementsWithString
@PostMapping(path="/metadata-elements/by-search-string") public OpenMetadataElementsResponse findMetadataElementsWithString(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody SearchStringRequestBody requestBody) Retrieve the metadata elements that contain the requested string.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrequestBody
- searchString to retrieve- Returns:
- list of matching metadata elements (or null if no elements match the name) or InvalidParameterException the qualified name is null UserNotAuthorizedException the governance action service is not able to access the element PropertyServerException there is a problem accessing the metadata store
-
findElementsForAnchor
@PostMapping(path="/metadata-elements/by-search-string/for-anchor/{anchorGUID}") public AnchorSearchMatchesResponse findElementsForAnchor(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String anchorGUID, @RequestBody SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description. The search string is interpreted as a regular expression (RegEx). The breadth of the search is determined by the supplied anchorGUID.- Parameters:
serverName
- name of the server instances for this requesturlMarker
- view service URL markeranchorGUID
- unique identifier of anchorrequestBody
- string to search for in text- Returns:
- list of results for assets that match the search string or InvalidParameterException the searchString is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
-
findElementsInAnchorDomain
@PostMapping(path="/metadata-elements/by-search-string/in-anchor-domain/{anchorDomainName}") public AnchorSearchMatchesListResponse findElementsInAnchorDomain(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String anchorDomainName, @RequestBody SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description. The search string is interpreted as a regular expression (RegEx). The breadth of the search is determined by the supplied domain name. The results are organized by anchor element.- Parameters:
serverName
- name of the server instances for this requesturlMarker
- view service URL markeranchorDomainName
- name of open metadata type for the domainrequestBody
- string to search for in text- Returns:
- list of results for assets that match the search string or InvalidParameterException the searchString is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
-
findElementsInAnchorScope
@PostMapping(path="/metadata-elements/by-search-string/in-anchor-scope/{anchorScopeGUID}") public AnchorSearchMatchesListResponse findElementsInAnchorScope(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String anchorScopeGUID, @RequestBody SearchStringRequestBody requestBody) Return a list of elements with the requested search string in their (display, resource)name, qualified name, title, text, summary, identifier or description. The search string is interpreted as a regular expression (RegEx). The breadth of the search is determined by the supplied scope guid. The results are organized by anchor element.- Parameters:
serverName
- name of the server instances for this requesturlMarker
- view service URL markeranchorScopeGUID
- unique identifier of the scope to userequestBody
- string to search for in text- Returns:
- list of results for assets that match the search string or InvalidParameterException the searchString is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
-
getAllRelatedMetadataElements
@PostMapping(path="/related-elements/{elementGUID}/any-type") public RelatedMetadataElementListResponse getAllRelatedMetadataElements(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startingAtEnd, @RequestBody(required=false) ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element.- Parameters:
serverName
- name of server instance to route request toelementGUID
- unique identifier for the starting metadata elementurlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.startingAtEnd
- indicates which end to retrieve from (0 is "either end"; 1 is end1; 2 is end 2)- Returns:
- list of related elements InvalidParameterException the unique identifier is null or not known; the relationship type is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
getRelatedMetadataElements
@PostMapping(path="/related-elements/{elementGUID}/type/{relationshipTypeName}") public RelatedMetadataElementListResponse getRelatedMetadataElements(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String relationshipTypeName, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startingAtEnd, @RequestBody(required=false) ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element via a specific relationship type.- Parameters:
serverName
- name of server instance to route request toelementGUID
- unique identifier for the starting metadata elementrelationshipTypeName
- type name of relationships to follow (or null for all)urlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.startingAtEnd
- indicates which end to retrieve from (0 is "either end"; 1 is end1; 2 is end 2)- Returns:
- list of related elements InvalidParameterException the unique identifier is null or not known; the relationship type is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
getAllMetadataElementRelationships
@PostMapping(path="/metadata-elements/{metadataElementAtEnd1GUID}/linked-by-any-type/to-elements/{metadataElementAtEnd2GUID}") public OpenMetadataRelationshipListResponse getAllMetadataElementRelationships(@PathVariable String serverName, @PathVariable String metadataElementAtEnd1GUID, @PathVariable String metadataElementAtEnd2GUID, @PathVariable String urlMarker, @RequestBody(required=false) ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements.- Parameters:
serverName
- name of server instance to route request tometadataElementAtEnd1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElementAtEnd2GUID
- unique identifier of the metadata element at end 2 of the relationshipurlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- list of related elements InvalidParameterException the unique identifier is null or not known; the relationship type is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
getAnchoredElementsGraph
@PostMapping(path="/metadata-elements/{elementGUID}/with-anchored-elements") public OpenMetadataGraphResponse getAnchoredElementsGraph(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String elementGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Return all the elements that are anchored to an element plus relationships between these elements and to other elements.- Parameters:
serverName
- name of the server instances for this requesturlMarker
- the identifier of the view service (for example runtime-manager for the Runtime Manager OMVS)elementGUID
- unique identifier for the elementrequestBody
- effective time and asOfTime- Returns:
- graph of elements or InvalidParameterException - one of the parameters is null or invalid or PropertyServerException - there is a problem retrieving the connected asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
-
getMetadataElementRelationships
@PostMapping(path="/metadata-elements/{metadataElementAtEnd1GUID}/linked-by-type/{relationshipTypeName}/to-elements/{metadataElementAtEnd2GUID}") public OpenMetadataRelationshipListResponse getMetadataElementRelationships(@PathVariable String serverName, @PathVariable String metadataElementAtEnd1GUID, @PathVariable String relationshipTypeName, @PathVariable String metadataElementAtEnd2GUID, @PathVariable String urlMarker, @RequestBody(required=false) ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements via a specific type of relationship.- Parameters:
serverName
- name of server instance to route request tometadataElementAtEnd1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElementAtEnd2GUID
- unique identifier of the metadata element at end 2 of the relationshiprelationshipTypeName
- type name of relationships to follow (or null for all)urlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- list of related elements InvalidParameterException the unique identifier is null or not known; the relationship type is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
findMetadataElements
@PostMapping(path="/metadata-elements/by-search-conditions") public OpenMetadataElementsResponse findMetadataElements(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody(required=false) FindRequestBody requestBody) Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrequestBody
- properties defining the search criteria- Returns:
- a list of elements matching the supplied criteria; null means no matching elements in the metadata store. InvalidParameterException one of the search parameters are is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
findRelationshipsBetweenMetadataElements
@PostMapping(path="/relationships/by-search-conditions") public OpenMetadataRelationshipListResponse findRelationshipsBetweenMetadataElements(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody FindRelationshipRequestBody requestBody) Return a list of relationships that match the requested conditions. The results can be received as a series of pages.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrequestBody
- properties defining the search criteria- Returns:
- a list of relationships - null means no matching relationships - or InvalidParameterException one of the search parameters are is invalid UserNotAuthorizedException the governance action service is not able to access the elements PropertyServerException there is a problem accessing the metadata store
-
getRelationshipByGUID
@PostMapping(path="/relationships/by-guid/{relationshipGUID}") public OpenMetadataRelationshipResponse getRelationshipByGUID(@PathVariable String serverName, @PathVariable String relationshipGUID, @PathVariable String urlMarker, @RequestBody(required=false) GetRequestBody requestBody) Retrieve the relationship using its unique identifier.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier for the metadata elementurlMarker
- view service URL markerrequestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- metadata element properties or InvalidParameterException the unique identifier is null or not known. UserNotAuthorizedException the governance action service is not able to access the element PropertyServerException there is a problem accessing the metadata store
-
getRelationshipHistory
@PostMapping(path="/relationships/{relationshipGUID}/history") public OpenMetadataRelationshipListResponse getRelationshipHistory(@PathVariable String serverName, @PathVariable String relationshipGUID, @PathVariable String urlMarker, @RequestBody(required=false) HistoryRequestBody requestBody) Retrieve all the versions of a relationship.- Parameters:
serverName
- name of the server to route the request torelationshipGUID
- unique identifier of object to retrieveurlMarker
- view service URL markerrequestBody
- the time window required- Returns:
- list of beans or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem removing the properties from the repositories. UserNotAuthorizedException the requesting user is not authorized to issue this request.
-