Class AssetCatalogEntityResource
java.lang.Object
org.odpi.openmetadata.accessservices.assetcatalog.server.spring.AssetCatalogEntityResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-catalog/users/{userId}")
public class AssetCatalogEntityResource
extends Object
The AssetCatalogEntityResource provides the server-side implementation of the
Asset Catalog Open Metadata Assess Service (OMAS).
This interface facilitates the searching for assets, provides details about specific assets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAssetContext
(String serverName, String userId, @NotBlank String assetGUID, String assetType) Return the full context of an asset/glossary term based on its identifier.getAssetDetail
(String serverName, String userId, @NotBlank String assetGUID, @NotNull String assetType) Fetch asset's header, classification and propertiesgetAssetRelationships
(String serverName, String userId, @NotBlank String assetGUID, String assetType, String relationshipType, @PositiveOrZero Integer from, @PositiveOrZero Integer pageSize) Fetch the relationships for a specific assetgetAssetsByTypeGUID
(String serverName, String userId, @NotBlank String typeGUID) Return a list of assets by asset type GUID without any additional search criteria The list includes also subtypesgetAssetsByTypeName
(String serverName, String userId, @NotBlank String typeName) Return a list of assets by asset type name without any additional search criteria The list includes also subtypesgetAssetUniverse
(String serverName, String userId, @NotBlank String assetGUID, @NotNull String assetType) Fetch asset's header, classification, properties and relationshipsgetClassificationsForAsset
(String serverName, String userId, @NotBlank String assetGUID, String assetType, String classificationName) Fetch the classification for a specific assetgetOutTopicConnection
(String serverName, String userId, String callerId) Returns the out topic connection.getSupportedTypes
(String serverName, String userId, String type) Returns the list with supported types for search, including the sub-types supportedsearchByType
(String serverName, String userId, @NotBlank String searchCriteria, SearchParameters searchParameters) Return a list of assets matching the search criteria without the full context
-
Constructor Details
-
AssetCatalogEntityResource
public AssetCatalogEntityResource()
-
-
Method Details
-
getAssetDetail
@GetMapping(path="/asset-details/{assetGUID}", produces="application/json") public AssetCatalogResponse getAssetDetail(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("assetGUID") @NotBlank @NotBlank String assetGUID, @RequestParam(name="assetType",required=false) @NotNull @NotNull String assetType) Fetch asset's header, classification and properties- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetType
- the type of the asset- Returns:
- the asset with its header and the list of associated classifications and specific properties
-
getAssetUniverse
@GetMapping(path="/asset-universe/{assetGUID}", produces="application/json") public AssetCatalogResponse getAssetUniverse(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("assetGUID") @NotBlank @NotBlank String assetGUID, @RequestParam(name="assetType",required=false) @NotNull @NotNull String assetType) Fetch asset's header, classification, properties and relationships- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetType
- the asset type- Returns:
- the asset with its header and the list of associated classifications and relationship
-
getAssetRelationships
@GetMapping(path="/asset-relationships/{assetGUID}", produces="application/json") public RelationshipListResponse getAssetRelationships(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("assetGUID") @NotBlank @NotBlank String assetGUID, @RequestParam(name="assetType",required=false) String assetType, @RequestParam(name="relationshipType",required=false) String relationshipType, @RequestParam(name="from",required=false,defaultValue="0") @PositiveOrZero @PositiveOrZero Integer from, @RequestParam(name="pageSize",required=false,defaultValue="100") @PositiveOrZero @PositiveOrZero Integer pageSize) Fetch the relationships for a specific asset- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetType
- the type of the assetrelationshipType
- the type of the relationshipfrom
- offsetpageSize
- limit the number of the assets returned- Returns:
- list of relationships for the given asset
-
getClassificationsForAsset
@GetMapping(path="/asset-classifications/{assetGUID}", produces="application/json") public ClassificationListResponse getClassificationsForAsset(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("assetGUID") @NotBlank @NotBlank String assetGUID, @RequestParam(name="assetType",required=false) String assetType, @RequestParam(name="classificationName",required=false) String classificationName) Fetch the classification for a specific asset- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetType
- the type of the assetclassificationName
- the name of the classification- Returns:
- ClassificationsResponse the classification for the asset
-
searchByType
@PostMapping(path="/search", produces="application/json") public AssetListResponse searchByType(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @RequestParam("searchCriteria") @NotBlank @NotBlank String searchCriteria, @RequestBody SearchParameters searchParameters) Return a list of assets matching the search criteria without the full context- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the usersearchCriteria
- a string expression of the characteristics of the required assetssearchParameters
- constrains to make the assets' search results more precise- Returns:
- list of found assets
-
getAssetsByTypeName
@GetMapping(path="/assets-by-type-name/{typeName}", produces="application/json") public AssetListResponse getAssetsByTypeName(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("typeName") @NotBlank @NotBlank String typeName) Return a list of assets by asset type name without any additional search criteria The list includes also subtypes- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the usertypeName
- the assets type name to search for- Returns:
- list of assets by type name
-
getAssetsByTypeGUID
@GetMapping(path="/assets-by-type-guid/{typeGUID}", produces="application/json") public AssetListResponse getAssetsByTypeGUID(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("typeGUID") @NotBlank @NotBlank String typeGUID) Return a list of assets by asset type GUID without any additional search criteria The list includes also subtypes- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the usertypeGUID
- the assets type GUID to search for- Returns:
- list of assets by type GUID
-
getAssetContext
@GetMapping(path="/asset-context/{assetGUID}", produces="application/json") public AssetResponse getAssetContext(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("assetGUID") @NotBlank @NotBlank String assetGUID, @RequestParam(name="assetType",required=false) String assetType) 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
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the global unique identifier of the assetassetType
- the type of the asset- Returns:
- list of properties used to narrow the search
-
getSupportedTypes
@GetMapping(path="/supportedTypes", produces="application/json") public AssetCatalogSupportedTypes getSupportedTypes(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @RequestParam(name="type",required=false) @Nullable String type) Returns the list with supported types for search, including the sub-types supported- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the usertype
- the type- Returns:
- list of types and sub-types supported for search
-
getOutTopicConnection
@GetMapping(path="/topics/out-topic-connection/{callerId}", produces="application/json") public ConnectionResponse getOutTopicConnection(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @PathVariable("callerId") String callerId) Returns the out topic connection.- Parameters:
serverName
- the server nameuserId
- the user idcallerId
- the caller id- Returns:
- the out topic connection
-