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
-
Method Summary
Modifier and TypeMethodDescriptionfindMetadataElements
(String serverName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, FindRequestBody requestBody) Return a list of metadata elements that match the supplied criteria.findMetadataElementsWithString
(String serverName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the metadata elements that contain the requested string.findRelationshipsBetweenMetadataElements
(String serverName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, FindRelationshipRequestBody requestBody) Return a list of relationships that match the requested conditions.getAllMetadataElementRelationships
(String serverName, String metadataElementAtEnd1GUID, String metadataElementAtEnd2GUID, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements.getAllRelatedMetadataElements
(String serverName, String elementGUID, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startingAtEnd, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element.getAnchoredElementsGraph
(String serverName, String urlMarker, String elementGUID, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, AnyTimeRequestBody 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, boolean forLineage, boolean forDuplicateProcessing, AnyTimeRequestBody requestBody) Retrieve the metadata element using its unique identifier.getMetadataElementByUniqueName
(String serverName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the metadata element using its unique name (typically the qualified name).getMetadataElementGUIDByUniqueName
(String serverName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).getMetadataElementHistory
(String serverName, String elementGUID, String urlMarker, int startFrom, int pageSize, boolean oldestFirst, boolean forLineage, boolean forDuplicateProcessing, HistoryRequestBody requestBody) Retrieve all the versions of an element.getMetadataElementRelationships
(String serverName, String metadataElementAtEnd1GUID, String relationshipTypeName, String metadataElementAtEnd2GUID, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the relationships linking the supplied elements via a specific type of relationship.getRelatedMetadataElements
(String serverName, String elementGUID, String relationshipTypeName, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, int startingAtEnd, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element via a specific relationship type.getRelationshipByGUID
(String serverName, String relationshipGUID, String urlMarker, boolean forLineage, boolean forDuplicateProcessing, AnyTimeRequestBody requestBody) Retrieve the relationship using its unique identifier.getRelationshipHistory
(String serverName, String relationshipGUID, String urlMarker, int startFrom, int pageSize, boolean oldestFirst, boolean forLineage, boolean forDuplicateProcessing, 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody(required=false) AnyTimeRequestBody 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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody NameRequestBody 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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody NameRequestBody 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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestParam(required=false,defaultValue="false") boolean oldestFirst, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @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 markerstartFrom
- the starting element number of the historical versions to return. This is used when retrieving versions beyond the first page of results. Zero means start from the first element.pageSize
- the maximum number of result versions that can be returned on this request. Zero means unrestricted return results size.oldestFirst
- defining how the results should be ordered.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicaterequestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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
-
getAllRelatedMetadataElements
@PostMapping(path="/related-elements/{elementGUID}/any-type") public RelatedMetadataElementListResponse getAllRelatedMetadataElements(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startingAtEnd, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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)startFrom
- paging start pointpageSize
- maximum results that can be returned- 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="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startingAtEnd, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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)startFrom
- paging start pointpageSize
- maximum results that can be returned- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) AnyTimeRequestBody 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 elementforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved elements are for duplicate processing so do not combine results from known duplicates.startFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to returnrequestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody(required=false) AnyTimeRequestBody 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 markerforLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.requestBody
- 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, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestParam(required=false,defaultValue="false") boolean oldestFirst, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @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 markerstartFrom
- the starting element number of the historical versions to return. This is used when retrieving versions beyond the first page of results. Zero means start from the first element.pageSize
- the maximum number of result versions that can be returned on this request. Zero means unrestricted return results size.oldestFirst
- defining how the results should be ordered.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicaterequestBody
- 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.
-