Class DatabaseManagerRESTServices


  • public class DatabaseManagerRESTServices
    extends Object
    DatabaseManagerRESTServices is the server-side implementation of the Data Manager OMAS's support for relational databases. It matches the DatabaseManagerClient.
    • Constructor Detail

      • DatabaseManagerRESTServices

        public DatabaseManagerRESTServices()
        Default constructor
    • Method Detail

      • createDatabase

        public GUIDResponse createDatabase​(String serverName,
                                           String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           DatabaseProperties databaseProperties)
        Create a new metadata element to represent a database.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseProperties - properties to store
        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)
      • createDatabaseFromTemplate

        public GUIDResponse createDatabaseFromTemplate​(String serverName,
                                                       String userId,
                                                       String databaseManagerGUID,
                                                       String databaseManagerName,
                                                       String templateGUID,
                                                       TemplateProperties templateProperties)
        Create a new metadata element to represent a database using an existing metadata element as a template.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        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)
      • updateDatabase

        public VoidResponse updateDatabase​(String serverName,
                                           String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseGUID,
                                           DatabaseProperties databaseProperties)
        Update the metadata element representing a database.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the metadata element to update
        databaseProperties - new properties for this element
        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)
      • publishDatabase

        public VoidResponse publishDatabase​(String serverName,
                                            String userId,
                                            String databaseGUID,
                                            NullRequestBody nullRequestBody)
        Update the zones for the database 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 Data Manager OMAS).
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseGUID - unique identifier of the metadata element to publish
        nullRequestBody - empty request body
        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)
      • withdrawDatabase

        public VoidResponse withdrawDatabase​(String serverName,
                                             String userId,
                                             String databaseGUID,
                                             NullRequestBody nullRequestBody)
        Update the zones for the database 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 Data Manager OMAS. This is the setting when the database is first created).
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseGUID - unique identifier of the metadata element to withdraw
        nullRequestBody - empty request body
        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)
      • removeDatabase

        public VoidResponse removeDatabase​(String serverName,
                                           String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseGUID,
                                           String qualifiedName,
                                           NullRequestBody nullRequestBody)
        Remove the metadata element representing a database.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        nullRequestBody - empty request body
        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)
      • findDatabases

        public DatabasesResponse findDatabases​(String serverName,
                                               String userId,
                                               SearchStringRequestBody requestBody,
                                               int startFrom,
                                               int pageSize)
        Retrieve the list of database metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabasesByName

        public DatabasesResponse getDatabasesByName​(String serverName,
                                                    String userId,
                                                    NameRequestBody requestBody,
                                                    int startFrom,
                                                    int pageSize)
        Retrieve the list of database metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabasesForDatabaseManager

        public DatabasesResponse getDatabasesForDatabaseManager​(String serverName,
                                                                String userId,
                                                                String databaseManagerGUID,
                                                                String databaseManagerName,
                                                                int startFrom,
                                                                int pageSize)
        Retrieve the list of databases created by this caller.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseByGUID

        public DatabaseResponse getDatabaseByGUID​(String serverName,
                                                  String userId,
                                                  String guid)
        Retrieve the database metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        guid - unique identifier of the requested metadata element
        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)
      • createDatabaseSchema

        public GUIDResponse createDatabaseSchema​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseGUID,
                                                 DatabaseSchemaProperties databaseSchemaProperties)
        Create a new metadata element to represent a database schema.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the database where the schema is located
        databaseSchemaProperties - properties about the database schema
        Returns:
        unique identifier of the new database schema 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)
      • createDatabaseSchemaFromTemplate

        public GUIDResponse createDatabaseSchemaFromTemplate​(String serverName,
                                                             String userId,
                                                             String databaseManagerGUID,
                                                             String databaseManagerName,
                                                             String templateGUID,
                                                             String databaseGUID,
                                                             TemplateProperties templateProperties)
        Create a new metadata element to represent a database schema using an existing metadata element as a template.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseGUID - unique identifier of the database where the schema is located
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new database schema 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)
      • updateDatabaseSchema

        public VoidResponse updateDatabaseSchema​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseSchemaGUID,
                                                 DatabaseSchemaProperties databaseSchemaProperties)
        Update the metadata element representing a database schema.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaGUID - unique identifier of the metadata element to update
        databaseSchemaProperties - new properties for the metadata element
        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)
      • publishDatabaseSchema

        public VoidResponse publishDatabaseSchema​(String serverName,
                                                  String userId,
                                                  String databaseSchemaGUID,
                                                  NullRequestBody nullRequestBody)
        Update the zones for the database 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 Data Manager OMAS).
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseSchemaGUID - unique identifier of the metadata element to publish
        nullRequestBody - empty request body
        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)
      • withdrawDatabaseSchema

        public VoidResponse withdrawDatabaseSchema​(String serverName,
                                                   String userId,
                                                   String databaseSchemaGUID,
                                                   NullRequestBody nullRequestBody)
        Update the zones for the database 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 Data Manager OMAS. This is the setting when the database is first created).
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseSchemaGUID - unique identifier of the metadata element to withdraw
        nullRequestBody - empty request body
        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)
      • removeDatabaseSchema

        public VoidResponse removeDatabaseSchema​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseSchemaGUID,
                                                 String qualifiedName,
                                                 NullRequestBody nullRequestBody)
        Remove the metadata element representing a database schema.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        nullRequestBody - empty request body
        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)
      • findDatabaseSchemas

        public DatabaseSchemasResponse findDatabaseSchemas​(String serverName,
                                                           String userId,
                                                           SearchStringRequestBody requestBody,
                                                           int startFrom,
                                                           int pageSize)
        Retrieve the list of database schema metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getSchemasForDatabase

        public DatabaseSchemasResponse getSchemasForDatabase​(String serverName,
                                                             String userId,
                                                             String databaseGUID,
                                                             int startFrom,
                                                             int pageSize)
        Return the list of schemas associated with a database.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseGUID - unique identifier of the database to query
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of metadata elements describing the schemas associated with the requested database 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)
      • getDatabaseSchemasByName

        public DatabaseSchemasResponse getDatabaseSchemasByName​(String serverName,
                                                                String userId,
                                                                NameRequestBody requestBody,
                                                                int startFrom,
                                                                int pageSize)
        Retrieve the list of database schema metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseSchemaByGUID

        public DatabaseSchemaResponse getDatabaseSchemaByGUID​(String serverName,
                                                              String userId,
                                                              String guid)
        Retrieve the database schema metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        guid - unique identifier of the requested metadata element
        Returns:
        requested 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)
      • createDatabaseTable

        public GUIDResponse createDatabaseTable​(String serverName,
                                                String userId,
                                                String databaseManagerGUID,
                                                String databaseManagerName,
                                                String databaseAssetGUID,
                                                DatabaseTableProperties databaseTableProperties)
        Create a new metadata element to represent a database table.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseAssetGUID - unique identifier of the database or database schema ASSET where the database table is located.
        databaseTableProperties - properties for the database table
        Returns:
        unique identifier of the new metadata element for the database table 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)
      • createDatabaseTableFromTemplate

        public GUIDResponse createDatabaseTableFromTemplate​(String serverName,
                                                            String userId,
                                                            String databaseManagerGUID,
                                                            String databaseManagerName,
                                                            String templateGUID,
                                                            String databaseAssetGUID,
                                                            TemplateProperties templateProperties)
        Create a new metadata element to represent a database table using an existing metadata element as a template.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseAssetGUID - unique identifier of the database or database schema where the database table is located.
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new database table 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)
      • updateDatabaseTable

        public VoidResponse updateDatabaseTable​(String serverName,
                                                String userId,
                                                String databaseManagerGUID,
                                                String databaseManagerName,
                                                String databaseTableGUID,
                                                DatabaseTableProperties databaseTableProperties)
        Update the metadata element representing a database table.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the database table to update
        databaseTableProperties - new properties for the database table
        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)
      • removeDatabaseTable

        public VoidResponse removeDatabaseTable​(String serverName,
                                                String userId,
                                                String databaseManagerGUID,
                                                String databaseManagerName,
                                                String databaseTableGUID,
                                                String qualifiedName,
                                                NullRequestBody nullRequestBody)
        Remove the metadata element representing a database table.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        nullRequestBody - empty request body
        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)
      • findDatabaseTables

        public DatabaseTablesResponse findDatabaseTables​(String serverName,
                                                         String userId,
                                                         SearchStringRequestBody requestBody,
                                                         int startFrom,
                                                         int pageSize)
        Retrieve the list of database table metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getTablesForDatabaseAsset

        public DatabaseTablesResponse getTablesForDatabaseAsset​(String serverName,
                                                                String userId,
                                                                String databaseAssetGUID,
                                                                int startFrom,
                                                                int pageSize)
        Retrieve the list of database tables associated with a database or database schema.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseAssetGUID - unique identifier of the database schema of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of associated 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)
      • getDatabaseTablesByName

        public DatabaseTablesResponse getDatabaseTablesByName​(String serverName,
                                                              String userId,
                                                              NameRequestBody requestBody,
                                                              int startFrom,
                                                              int pageSize)
        Retrieve the list of database table metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseTableByGUID

        public DatabaseTableResponse getDatabaseTableByGUID​(String serverName,
                                                            String userId,
                                                            String guid)
        Retrieve the database table metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        guid - unique identifier of the requested metadata element
        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)
      • createDatabaseView

        public GUIDResponse createDatabaseView​(String serverName,
                                               String userId,
                                               String databaseManagerGUID,
                                               String databaseManagerName,
                                               String databaseSchemaGUID,
                                               DatabaseViewProperties databaseViewProperties)
        Create a new metadata element to represent a database view.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaGUID - unique identifier of the database schema where the database view is located.
        databaseViewProperties - properties for the new view
        Returns:
        unique identifier of the new metadata element for the database view 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)
      • createDatabaseViewFromTemplate

        public GUIDResponse createDatabaseViewFromTemplate​(String serverName,
                                                           String userId,
                                                           String databaseManagerGUID,
                                                           String databaseManagerName,
                                                           String templateGUID,
                                                           String databaseSchemaGUID,
                                                           TemplateProperties templateProperties)
        Create a new metadata element to represent a database view using an existing metadata element as a template.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseSchemaGUID - unique identifier of the database schema where the database view is located.
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element for the database view 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)
      • updateDatabaseView

        public VoidResponse updateDatabaseView​(String serverName,
                                               String userId,
                                               String databaseManagerGUID,
                                               String databaseManagerName,
                                               String databaseViewGUID,
                                               DatabaseViewProperties databaseViewProperties)
        Update the metadata element representing a database table.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseViewGUID - unique identifier of the database view to update
        databaseViewProperties - properties for the new database view
        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)
      • removeDatabaseView

        public VoidResponse removeDatabaseView​(String serverName,
                                               String userId,
                                               String databaseManagerGUID,
                                               String databaseManagerName,
                                               String databaseViewGUID,
                                               String qualifiedName,
                                               NullRequestBody nullRequestBody)
        Remove the metadata element representing a database table.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseViewGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        nullRequestBody - empty request body
        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)
      • findDatabaseViews

        public DatabaseViewsResponse findDatabaseViews​(String serverName,
                                                       String userId,
                                                       SearchStringRequestBody requestBody,
                                                       int startFrom,
                                                       int pageSize)
        Retrieve the list of database view metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getViewsForDatabaseAsset

        public DatabaseViewsResponse getViewsForDatabaseAsset​(String serverName,
                                                              String userId,
                                                              String databaseAssetGUID,
                                                              int startFrom,
                                                              int pageSize)
        Retrieve the list of database views associated with a database or database schema.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseAssetGUID - unique identifier of the database or database schema of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of associated 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)
      • getDatabaseViewsByName

        public DatabaseViewsResponse getDatabaseViewsByName​(String serverName,
                                                            String userId,
                                                            NameRequestBody requestBody,
                                                            int startFrom,
                                                            int pageSize)
        Retrieve the list of database view metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseViewByGUID

        public DatabaseViewResponse getDatabaseViewByGUID​(String serverName,
                                                          String userId,
                                                          String guid)
        Retrieve the database view metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        guid - unique identifier of the requested metadata element
        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)
      • createDatabaseColumn

        public GUIDResponse createDatabaseColumn​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseTableGUID,
                                                 DatabaseColumnProperties databaseColumnProperties)
        Create a new metadata element to represent a database column.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the database table where this column is located
        databaseColumnProperties - properties for the new column
        Returns:
        unique identifier of the new metadata element for the database column 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)
      • createDatabaseColumnFromTemplate

        public GUIDResponse createDatabaseColumnFromTemplate​(String serverName,
                                                             String userId,
                                                             String databaseManagerGUID,
                                                             String databaseManagerName,
                                                             String templateGUID,
                                                             String databaseTableGUID,
                                                             TemplateProperties templateProperties)
        Create a new metadata element to represent a database column using an existing metadata element as a template.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseTableGUID - unique identifier of the database table where this column is located
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element for the database column 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)
      • updateDatabaseColumn

        public VoidResponse updateDatabaseColumn​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseColumnGUID,
                                                 DatabaseColumnProperties databaseColumnProperties)
        Update the metadata element representing a database column.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the metadata element to update
        databaseColumnProperties - new properties for the metadata element
        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)
      • removeDatabaseColumn

        public VoidResponse removeDatabaseColumn​(String serverName,
                                                 String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String databaseColumnGUID,
                                                 String qualifiedName,
                                                 NullRequestBody nullRequestBody)
        Remove the metadata element representing a database column.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        nullRequestBody - empty request body
        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)
      • findDatabaseColumns

        public DatabaseColumnsResponse findDatabaseColumns​(String serverName,
                                                           String userId,
                                                           SearchStringRequestBody requestBody,
                                                           int startFrom,
                                                           int pageSize)
        Retrieve the list of database column metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of matching metadata elements 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)
      • getColumnsForDatabaseTable

        public DatabaseColumnsResponse getColumnsForDatabaseTable​(String serverName,
                                                                  String userId,
                                                                  String databaseTableGUID,
                                                                  int startFrom,
                                                                  int pageSize)
        Retrieve the list of column for a database table (or view)
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseTableGUID - unique identifier of the database table of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseColumnsByName

        public DatabaseColumnsResponse getDatabaseColumnsByName​(String serverName,
                                                                String userId,
                                                                NameRequestBody requestBody,
                                                                int startFrom,
                                                                int pageSize)
        Retrieve the list of database column metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        requestBody - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getDatabaseColumnByGUID

        public DatabaseColumnResponse getDatabaseColumnByGUID​(String serverName,
                                                              String userId,
                                                              String guid)
        Retrieve the database column metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        guid - unique identifier of the requested metadata element
        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)
      • setPrimaryKeyOnColumn

        public VoidResponse setPrimaryKeyOnColumn​(String serverName,
                                                  String userId,
                                                  String databaseManagerGUID,
                                                  String databaseManagerName,
                                                  String databaseColumnGUID,
                                                  DatabasePrimaryKeyProperties databasePrimaryKeyProperties)
        Classify a column in a database table as the primary key. This means each row has a different value in this column and it can be used to uniquely identify the column.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier if the primary key column
        databasePrimaryKeyProperties - properties to store
        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)
      • removePrimaryKeyFromColumn

        public VoidResponse removePrimaryKeyFromColumn​(String serverName,
                                                       String userId,
                                                       String databaseManagerGUID,
                                                       String databaseManagerName,
                                                       String databaseColumnGUID,
                                                       NullRequestBody nullRequestBody)
        Remove the classification that this column is a primary key.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier if the primary key column
        nullRequestBody - empty request body
        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)
      • addForeignKeyRelationship

        public VoidResponse addForeignKeyRelationship​(String serverName,
                                                      String userId,
                                                      String databaseManagerGUID,
                                                      String databaseManagerName,
                                                      String primaryKeyColumnGUID,
                                                      String foreignKeyColumnGUID,
                                                      DatabaseForeignKeyProperties databaseForeignKeyProperties)
        Create a foreign relationship between two columns. One of the columns holds the primary key of the other to form a link.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        primaryKeyColumnGUID - unique identifier of the column containing the primary key
        foreignKeyColumnGUID - unique identifier of the column containing the primary key from the other table
        databaseForeignKeyProperties - properties about the foreign key relationship
        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)
      • removeForeignKeyRelationship

        public VoidResponse removeForeignKeyRelationship​(String serverName,
                                                         String userId,
                                                         String databaseManagerGUID,
                                                         String databaseManagerName,
                                                         String primaryKeyColumnGUID,
                                                         String foreignKeyColumnGUID,
                                                         NullRequestBody nullRequestBody)
        Remove the foreign key relationship for the requested columns.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        primaryKeyColumnGUID - unique identifier of the column that is the linked primary key
        foreignKeyColumnGUID - unique identifier of the column the contains the primary key from another table
        nullRequestBody - empty request body
        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)