Class DataAssetExchangeResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-manager/users/{userId}")
    public class DataAssetExchangeResource
    extends Object
    DataAssetExchangeResource is the server-side implementation of the Asset Manager OMAS's support for data asset such as data sets. It matches the DataAssetExchangeClient.
    • Constructor Detail

      • DataAssetExchangeResource

        public DataAssetExchangeResource()
        Default constructor
    • Method Detail

      • createDataAsset

        @PostMapping(path="/data-assets")
        public GUIDResponse createDataAsset​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @RequestParam
                                            boolean assetManagerIsHome,
                                            @RequestBody
                                            DataAssetRequestBody requestBody)
        Create a new metadata element to represent the root of an asset.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetManagerIsHome - ensure that only the asset manager can update this asset
        requestBody - properties to store
        Returns:
        unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
      • createDataAssetFromTemplate

        @PostMapping(path="/data-assets/from-template/{templateGUID}")
        public GUIDResponse createDataAssetFromTemplate​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @PathVariable
                                                        String templateGUID,
                                                        @RequestParam
                                                        boolean assetManagerIsHome,
                                                        @RequestBody
                                                        TemplateRequestBody requestBody)
        Create a new metadata element to represent an asset using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new asset.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetManagerIsHome - ensure that only the asset manager can update this asset
        templateGUID - unique identifier of the metadata element to copy
        requestBody - properties that override the template and correlate to external identifiers
        Returns:
        unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • updateDataAsset

        @PostMapping(path="/data-assets/{assetGUID}")
        public VoidResponse updateDataAsset​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @PathVariable
                                            String assetGUID,
                                            @RequestParam
                                            boolean isMergeUpdate,
                                            @RequestBody
                                            DataAssetRequestBody requestBody)
        Update the metadata element representing an asset.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        requestBody - new properties for this element
        Returns:
        void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
      • publishDataAsset

        @PostMapping(path="/data-assets/{assetGUID}/publish")
        public VoidResponse publishDataAsset​(@PathVariable
                                             String serverName,
                                             @PathVariable
                                             String userId,
                                             @PathVariable
                                             String assetGUID,
                                             @RequestBody(required=false)
                                             AssetManagerIdentifiersRequestBody requestBody)
        Update the zones for the asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Asset Manager OMAS).
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to publish
        requestBody - correlation properties
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • withdrawDataAsset

        @PostMapping(path="/data-assets/{assetGUID}/withdraw")
        public VoidResponse withdrawDataAsset​(@PathVariable
                                              String serverName,
                                              @PathVariable
                                              String userId,
                                              @PathVariable
                                              String assetGUID,
                                              @RequestBody(required=false)
                                              AssetManagerIdentifiersRequestBody requestBody)
        Update the zones for the asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Asset Manager OMAS. This is the setting when the database is first created).
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to withdraw
        requestBody - correlation properties
        Returns:
        void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
      • removeDataAsset

        @PostMapping(path="/data-assets/{assetGUID}/remove")
        public VoidResponse removeDataAsset​(@PathVariable
                                            String serverName,
                                            @PathVariable
                                            String userId,
                                            @PathVariable
                                            String assetGUID,
                                            @RequestBody(required=false)
                                            MetadataCorrelationProperties requestBody)
        Remove the metadata element representing an asset. This will delete the asset and all anchored elements such as schema and comments.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to remove
        requestBody - correlation properties
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • setDataAssetAsReferenceData

        @PostMapping(path="/data-assets/{assetGUID}/is-reference-data")
        public VoidResponse setDataAssetAsReferenceData​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @PathVariable
                                                        String assetGUID,
                                                        @RequestBody(required=false)
                                                        MetadataCorrelationProperties requestBody)
        Classify the asset to indicate that it can be used as reference data.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to update
        requestBody - correlation properties
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • clearDataAssetAsReferenceData

        @PostMapping(path="/data-assets/{assetGUID}/is-reference-data/remove")
        public VoidResponse clearDataAssetAsReferenceData​(@PathVariable
                                                          String serverName,
                                                          @PathVariable
                                                          String userId,
                                                          @PathVariable
                                                          String assetGUID,
                                                          @RequestBody(required=false)
                                                          MetadataCorrelationProperties requestBody)
        Remove the reference data designation from the asset.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the metadata element to update
        requestBody - correlation properties
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • findDataAssets

        @PostMapping(path="/data-assets/by-search-string")
        public DataAssetElementsResponse findDataAssets​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @RequestParam
                                                        int startFrom,
                                                        @RequestParam
                                                        int pageSize,
                                                        @RequestBody
                                                        SearchStringRequestBody requestBody)
        Retrieve the list of asset metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - search parameter and correlation properties
        Returns:
        list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • scanDataAssets

        @PostMapping(path="/data-assets/scan")
        public DataAssetElementsResponse scanDataAssets​(@PathVariable
                                                        String serverName,
                                                        @PathVariable
                                                        String userId,
                                                        @RequestParam
                                                        int startFrom,
                                                        @RequestParam
                                                        int pageSize,
                                                        @RequestBody
                                                        AssetManagerIdentifiersRequestBody requestBody)
        Step through the assets visible to this caller.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - search parameter and correlation properties
        Returns:
        list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • getDataAssetsByName

        @PostMapping(path="/data-assets/by-name")
        public DataAssetElementsResponse getDataAssetsByName​(@PathVariable
                                                             String serverName,
                                                             @PathVariable
                                                             String userId,
                                                             @RequestParam
                                                             int startFrom,
                                                             @RequestParam
                                                             int pageSize,
                                                             @RequestBody
                                                             NameRequestBody requestBody)
        Retrieve the list of asset metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - search parameter and correlation properties
        Returns:
        list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • getDataAssetsForAssetManager

        @PostMapping(path="/data-assets/by-asset-manager")
        public DataAssetElementsResponse getDataAssetsForAssetManager​(@PathVariable
                                                                      String serverName,
                                                                      @PathVariable
                                                                      String userId,
                                                                      @RequestParam
                                                                      int startFrom,
                                                                      @RequestParam
                                                                      int pageSize,
                                                                      @RequestBody
                                                                      AssetManagerIdentifiersRequestBody requestBody)
        Retrieve the list of assets created on behalf of the named asset manager.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        requestBody - search parameters and correlation properties
        Returns:
        list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
      • getDataAssetByGUID

        @PostMapping(path="/data-assets/{assetGUID}/retrieve")
        public DataAssetElementResponse getDataAssetByGUID​(@PathVariable
                                                           String serverName,
                                                           @PathVariable
                                                           String userId,
                                                           @PathVariable
                                                           String assetGUID,
                                                           @RequestBody(required=false)
                                                           AssetManagerIdentifiersRequestBody requestBody)
        Retrieve the asset metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetGUID - unique identifier of the requested metadata element
        requestBody - correlation properties
        Returns:
        matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)