Class AssetCatalogResource
java.lang.Object
org.odpi.openmetadata.viewservices.assetcatalog.server.spring.AssetCatalogResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/asset-catalog")
public class AssetCatalogResource
extends Object
The AssetCatalogResource provides the Spring API endpoints of the Asset Catalog Open Metadata View Service (OMVS).
This interface provides the interfaces for Egeria UIs. The set with "old" in their URL are from the Egeria UI Application.
They are deprecated because they do not conform the Egeria's error handling standards.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionelementHierarchy
(String serverName, ElementHierarchyRequest elementHierarchyRequest) Returns a subgraph representing the hierarchy of a certain node, based on the request.Fetch asset's header, classification and properties.getAssetContext
(String serverName, String guid) Return the full context of an asset/glossary term based on its identifier.getEndToEndLineage
(String serverName, String guid, boolean includeProcesses) Return the graph of nodes that describe the end-to-end lineage for the starting element.getLineageVertex
(String serverName, String guid) Retrieves the details of a specific node in the lineage graph.Gets nodes names of certain type with display name containing a certain value.getSemanticLineage
(String serverName, String guid, boolean includeProcesses) Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship.getSupportedTypes
(String serverName) Returns the list with supported types for search, including the subtypes supportedGets available entities types from lineage repository.getUltimateDestination
(String serverName, String guid, boolean includeProcesses) Return the nodes and relationships that describe the know ultimate destinations of the starting element.getUltimateSource
(String serverName, String guid, boolean includeProcesses) Return the nodes and relationships that describe the know ultimate sources of the starting element.searchAssets
(String serverName, String searchCriteria, List<String> types, String sequencingProperty, SequencingOrder sequencingOrder, boolean caseSensitive, boolean exactMatch, Integer startFrom, Integer pageSize) Return a list of assets matching the search criteria without the full contextsearchAssetsByTypeGUID
(String serverName, String typeGUID) Return a list of assets matching the type GUID without the full context.searchAssetsByTypeName
(String serverName, String typeName) Return a list of assets matching the type name without the full context The list includes also subtypessearchForVertices
(String serverName, LineageSearchRequest searchRequest) Returns the list of vertices that the user will initially see when querying lineage.
-
Constructor Details
-
AssetCatalogResource
public AssetCatalogResource()Default constructor
-
-
Method Details
-
searchAssets
@GetMapping(path="/assets/search") public AssetListResponse searchAssets(@PathVariable String serverName, @RequestParam("q") String searchCriteria, @RequestParam("types") List<String> types, @RequestParam(name="sequencingProperty",defaultValue="displayName") String sequencingProperty, @RequestParam(name="sequencingOrder",defaultValue="PROPERTY_ASCENDING") SequencingOrder sequencingOrder, @RequestParam(defaultValue="false") boolean caseSensitive, @RequestParam(defaultValue="false") boolean exactMatch, @RequestParam(name="sequencingProperty",defaultValue="0") Integer startFrom, @RequestParam(defaultValue="10") Integer pageSize) Return a list of assets matching the search criteria without the full context- Parameters:
serverName
- name of the server to route the request tosearchCriteria
- the query parameter with the search phrasetypes
- OM types list to search forsequencingProperty
- name of the property based on which to sort the resultsequencingOrder
- PROPERTY_ASCENDING or PROPERTY_DESCENDINGcaseSensitive
- set case sensitive flagexactMatch
- set exact match flagstartFrom
- the offset for the resultspageSize
- the number of results per page- Returns:
- list of assets or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
-
searchAssetsByTypeName
@GetMapping(path="/assets/search-by-type-name/{typeName}") public AssetListResponse searchAssetsByTypeName(@PathVariable String serverName, @PathVariable("typeName") String typeName) Return a list of assets matching the type name without the full context The list includes also subtypes- Parameters:
serverName
- name of the server to route the request totypeName
- the assets type name to search for- Returns:
- list of assets by type name or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
-
searchAssetsByTypeGUID
@GetMapping(path="/assets/search-by-type-guid/{typeGUID}") public AssetListResponse searchAssetsByTypeGUID(@PathVariable String serverName, @PathVariable("typeGUID") String typeGUID) Return a list of assets matching the type GUID without the full context. The list includes also subtypes- Parameters:
serverName
- name of the server to route the request totypeGUID
- the assets type GUID to search for- Returns:
- list of assets by type GUID or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
-
getSupportedTypes
@GetMapping(path="/assets/types") public AssetCatalogSupportedTypes getSupportedTypes(@PathVariable String serverName) Returns the list with supported types for search, including the subtypes supported- Parameters:
serverName
- name of the server to route the request to- Returns:
- the supported types from Asset Consumer OMAS or PropertyServerException if a configuration on the backend InvalidParameterException if parameter validation fails UserNotAuthorizedException security access problem
-
getAsset
@GetMapping("/assets/{guid}") public AssetCatalogResponse getAsset(@PathVariable String serverName, @PathVariable("guid") String guid) Fetch asset's header, classification and properties.- Parameters:
serverName
- name of the server to route the request toguid
- of the Entity to be retrieved- Returns:
- the asset details or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
-
getAssetContext
@GetMapping("/assets/{guid}/context") public AssetResponse getAssetContext(@PathVariable String serverName, @PathVariable String guid) Return the full context of an asset/glossary term based on its identifier. The response contains the list of the connections assigned to the asset.- Parameters:
serverName
- name of the server to route the request toguid
- of the Entity to be retrieved- Returns:
- the entity context or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
-
getUltimateSource
@GetMapping("/lineage/entities/{guid}/ultimate-source") public LineageResponse getUltimateSource(@PathVariable String serverName, @PathVariable("guid") String guid, @RequestParam boolean includeProcesses) Return the nodes and relationships that describe the know ultimate sources of the starting element.- Parameters:
serverName
- name of the server to route the request toguid
- unique identifier of the starting elementincludeProcesses
- if true Process nodes will be included- Returns:
- graph of nodes and edges describing the ultimate sources of the asset or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getEndToEndLineage
@GetMapping("/lineage/entities/{guid}/end-to-end") public LineageResponse getEndToEndLineage(@PathVariable String serverName, @PathVariable("guid") String guid, @RequestParam boolean includeProcesses) Return the graph of nodes that describe the end-to-end lineage for the starting element.- Parameters:
serverName
- name of the server to route the request toguid
- unique identifier of the starting elementincludeProcesses
- if true Process nodes will be included- Returns:
- graph of nodes and edges describing the end to end flow or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getUltimateDestination
@GetMapping("/lineage/entities/{guid}/ultimate-destination") public LineageResponse getUltimateDestination(@PathVariable String serverName, @PathVariable("guid") String guid, @RequestParam boolean includeProcesses) Return the nodes and relationships that describe the know ultimate destinations of the starting element.- Parameters:
serverName
- name of the server to route the request toguid
- unique identifier of the starting elementincludeProcesses
- if true Process nodes will be included- Returns:
- graph of nodes and edges describing the ultimate destination of the asset or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getSemanticLineage
@GetMapping("/lineage/entities/{guid}/semantic-lineage") public LineageResponse getSemanticLineage(@PathVariable String serverName, @PathVariable("guid") String guid, @RequestParam boolean includeProcesses) Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship.- Parameters:
serverName
- name of the server to route the request toguid
- unique identifier of the starting glossary term elementincludeProcesses
- if true Process nodes will be included- Returns:
- graph of nodes and edges describing the assets linked to the glossary term or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getLineageVertex
@GetMapping("/lineage/entities/{guid}/details") public LineageVertexResponse getLineageVertex(@PathVariable String serverName, @PathVariable("guid") String guid) Retrieves the details of a specific node in the lineage graph.- Parameters:
serverName
- name of the server to route the request toguid
- of the Entity to be retrieved- Returns:
- the entity details or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getTypes
Gets available entities types from lineage repository.- Parameters:
serverName
- name of the server to route the request to- Returns:
- the available entities types or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
getNodes
@GetMapping("/lineage/nodes") public LineageNodeNamesResponse getNodes(@PathVariable String serverName, @RequestParam("type") String type, @RequestParam("name") String searchValue, @RequestParam("limit") int limit) Gets nodes names of certain type with display name containing a certain value.- Parameters:
serverName
- name of the server to route the request totype
- the type of the nodes name to search forsearchValue
- the string to be contained in the qualified name of the node - case-insensitivelimit
- the maximum number of node names to retrieve- Returns:
- the list of node names or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
searchForVertices
@PostMapping("/lineage/nodes/search") public LineageSearchResponse searchForVertices(@PathVariable String serverName, @RequestBody LineageSearchRequest searchRequest) Returns the list of vertices that the user will initially see when querying lineage. In the future, this method will be extended to condense large paths to prevent cluttering of the users screen. The user will be able to extend the condensed path by querying a different method.- Parameters:
serverName
- name of the server to route the request tosearchRequest
- filtering details for the search- Returns:
- list of graph nodes or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-
elementHierarchy
@PostMapping("/lineage/elements/hierarchy") public LineageResponse elementHierarchy(@PathVariable String serverName, @RequestBody ElementHierarchyRequest elementHierarchyRequest) Returns a subgraph representing the hierarchy of a certain node, based on the request.- Parameters:
serverName
- name of the server to route the request toelementHierarchyRequest
- contains the guid of the queried node and the hierarchyType of the display name of the nodes- Returns:
- a subgraph containing all relevant paths or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
-