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 some of the Spring API endpoints of the Asset Catalog Open Metadata View Service (OMVS).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindInAssetDomain
(String serverName, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, FilterRequestBody requestBody) Locate string value in elements that are anchored to assets.getAssetGraph
(String serverName, String assetGUID, int startFrom, int pageSize) Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.getAssetLineageGraph
(String serverName, String assetGUID, int startFrom, int pageSize, List<String> relationshipTypes) Return all the elements that are linked to an asset using lineage relationships.getAssetsByMetadataCollectionId
(String serverName, String metadataCollectionId, int startFrom, int pageSize, FilterRequestBody requestBody) Return a list of assets that come from the requested metadata collection.getAssetTypes
(String serverName) Return the subtypes for asset.
-
Constructor Details
-
AssetCatalogResource
public AssetCatalogResource()Default constructor
-
-
Method Details
-
getAssetTypes
@GetMapping(path="/assets/types") public AssetCatalogSupportedTypes getAssetTypes(@PathVariable String serverName) Return the subtypes for asset.- 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
-
getAssetGraph
@GetMapping(path="/assets/{assetGUID}/as-graph") public AssetGraphResponse getAssetGraph(@PathVariable String serverName, @PathVariable String assetGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize) 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 request.assetGUID
- uniqueId for the connection.startFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- 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 UnrecognizedConnectionGUIDException the supplied GUID is not recognized by the property server or NoConnectedAssetException there is no asset associated with this connection or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getAssetLineageGraph
@PostMapping(path="/assets/{assetGUID}/as-lineage-graph") public AssetLineageGraphResponse getAssetLineageGraph(@PathVariable String serverName, @PathVariable String assetGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) List<String> relationshipTypes) Return all the elements that are linked to an asset using lineage relationships. The relationships are retrieved both from the asset, and the anchored schema elements- Parameters:
serverName
- name of the server instances for this requestassetGUID
- unique identifier for the assetrelationshipTypes
- list of relationship type names to use in the searchstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- 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.
-
findInAssetDomain
@PostMapping(path="/assets/in-domain/by-search-string") public AssetSearchMatchesListResponse findInAssetDomain(@PathVariable String serverName, @RequestParam(required=false,defaultValue="true") boolean startsWith, @RequestParam(required=false,defaultValue="false") boolean endsWith, @RequestParam(required=false,defaultValue="false") boolean ignoreCase, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) FilterRequestBody requestBody) Locate string value in elements that are anchored to assets. The search string may be a regEx.- Parameters:
serverName
- name of the server instances for this requestrequestBody
- string to search for in textstartsWith
- does the value start with the supplied string?endsWith
- does the value end with the supplied string?ignoreCase
- should the search ignore case?startFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- 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
-
getAssetsByMetadataCollectionId
@PostMapping(path="/assets/by-metadata-collection-id/{metadataCollectionId}") public AssetsResponse getAssetsByMetadataCollectionId(@PathVariable String serverName, @PathVariable String metadataCollectionId, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) FilterRequestBody requestBody) Return a list of assets that come from the requested metadata collection.- Parameters:
serverName
- name of the server instances for this requestmetadataCollectionId
- guid to search forstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to returnrequestBody
- optional type name to restrict search by- Returns:
- list of unique identifiers for Assets with the requested name or InvalidParameterException the name is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
-