Class MetadataExplorerRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.metadataexplorer.server.MetadataExplorerRESTServices
The MetadataExplorerRESTServices provides the server-side implementation of the Metadata Explorer Open Metadata
View Service (OMVS). This interface provides access to a person's profile, roles and network.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindMetadataElements
(String serverName, String viewServiceURLMarker, 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 viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the metadata elements that contain the requested string.findRelationshipsBetweenMetadataElements
(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, FindRelationshipRequestBody requestBody) Return a list of relationships that match the requested conditions.getAnchoredElementsGraph
(String serverName, String viewServiceURLMarker, String elementGUID, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, AnyTimeRequestBody requestBody) Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.getMetadataElementByGUID
(String serverName, String elementGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, AnyTimeRequestBody requestBody) Retrieve the metadata element using its unique identifier.getMetadataElementByUniqueName
(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the metadata element using its unique name (typically the qualified name).getMetadataElementGUIDByUniqueName
(String serverName, String viewServiceURLMarker, 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 viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, boolean oldestFirst, HistoryRequestBody requestBody) Retrieve all the versions of an element.getMetadataElementRelationships
(String serverName, String metadataElementAtEnd1GUID, String relationshipTypeName, String metadataElementAtEnd2GUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the relationships linking to the supplied elements.getRelatedMetadataElements
(String serverName, String elementGUID, String relationshipTypeName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startingAtEnd, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the metadata elements connected to the supplied element.getRelationshipByGUID
(String serverName, String relationshipGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, AnyTimeRequestBody requestBody) Retrieve the relationship using its unique identifier.getRelationshipHistory
(String serverName, String relationshipGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, boolean oldestFirst, HistoryRequestBody requestBody) Retrieve all the versions of an element.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
MetadataExplorerRESTServices
public MetadataExplorerRESTServices()Default constructor
-
-
Method Details
-
getMetadataElementByGUID
public OpenMetadataElementResponse getMetadataElementByGUID(String serverName, String elementGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, 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 elementviewServiceURLMarker
- 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
public OpenMetadataElementResponse getMetadataElementByUniqueName(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the metadata element using its unique name (typically the qualified name).- Parameters:
serverName
- name of server instance to route request toviewServiceURLMarker
- 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
public GUIDResponse getMetadataElementGUIDByUniqueName(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, 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 toviewServiceURLMarker
- 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
public OpenMetadataElementsResponse getMetadataElementHistory(String serverName, String elementGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, boolean oldestFirst, HistoryRequestBody requestBody) Retrieve all the versions of an element.- Parameters:
serverName
- name of server instance to route request toelementGUID
- unique identifier for the metadata elementviewServiceURLMarker
- view service URL markerforLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved elements are for duplicate processing so do not combine results from known duplicates.startFrom
- paging start pointpageSize
- maximum results that can be returnedoldestFirst
- defining how the results should be ordered.requestBody
- the time window required- 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
-
findMetadataElementsWithString
public OpenMetadataElementsResponse findMetadataElementsWithString(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the metadata elements that contain the requested string.- Parameters:
serverName
- name of server instance to route request toviewServiceURLMarker
- view service URL markerforLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved elements are 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
-
getRelatedMetadataElements
public RelatedMetadataElementListResponse getRelatedMetadataElements(String serverName, String elementGUID, String relationshipTypeName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startingAtEnd, int startFrom, int pageSize, 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 elementrelationshipTypeName
- type name of relationships to follow (or null for all)viewServiceURLMarker
- view service URL markerstartingAtEnd
- indicates which end to retrieve from (0 is "either end"; 1 is end1; 2 is end 2)forLineage
- 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.requestBody
- only return an 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
public OpenMetadataGraphResponse getAnchoredElementsGraph(String serverName, String viewServiceURLMarker, String elementGUID, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, AnyTimeRequestBody requestBody) Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.- Parameters:
serverName
- name of the server instances for this requestviewServiceURLMarker
- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)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
public OpenMetadataRelationshipListResponse getMetadataElementRelationships(String serverName, String metadataElementAtEnd1GUID, String relationshipTypeName, String metadataElementAtEnd2GUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, ResultsRequestBody requestBody) Retrieve the relationships linking to 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 relationshiprelationshipTypeName
- type name of relationships to follow (or null for all)viewServiceURLMarker
- view service URL markerforLineage
- 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.requestBody
- only return an 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
public OpenMetadataElementsResponse findMetadataElements(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, 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 toviewServiceURLMarker
- view service URL markerforLineage
- 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
- 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
public OpenMetadataRelationshipListResponse findRelationshipsBetweenMetadataElements(String serverName, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, 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 toviewServiceURLMarker
- view service URL markerforLineage
- 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
- 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
public OpenMetadataRelationshipResponse getRelationshipByGUID(String serverName, String relationshipGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, AnyTimeRequestBody requestBody) Retrieve the relationship using its unique identifier.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier for the relationshipviewServiceURLMarker
- 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
public OpenMetadataRelationshipListResponse getRelationshipHistory(String serverName, String relationshipGUID, String viewServiceURLMarker, boolean forLineage, boolean forDuplicateProcessing, int startFrom, int pageSize, boolean oldestFirst, HistoryRequestBody requestBody) Retrieve all the versions of an element.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier for the metadata elementviewServiceURLMarker
- view service URL markerforLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved elements are for duplicate processing so do not combine results from known duplicates.startFrom
- paging start pointpageSize
- maximum results that can be returnedoldestFirst
- defining how the results should be ordered.requestBody
- the time window required- 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
-