Class ConnectionRESTServices


  • public class ConnectionRESTServices
    extends Object
    ConnectionRESTServices provides the ability to manage connection information.
    • Constructor Detail

      • ConnectionRESTServices

        public ConnectionRESTServices()
        Default constructor
    • Method Detail

      • createConnection

        public GUIDResponse createConnection​(String serverName,
                                             String userId,
                                             ConnectionProperties requestBody)
        Create a new metadata element to represent a connection.
        Parameters:
        serverName - name of calling server
        userId - calling user
        requestBody - properties to store
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • createConnectionFromTemplate

        public GUIDResponse createConnectionFromTemplate​(String serverName,
                                                         String userId,
                                                         String templateGUID,
                                                         TemplateProperties templateProperties)
        Create a new metadata element to represent a connection using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new connection.
        Parameters:
        serverName - name of calling server
        userId - calling user
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • updateConnection

        public VoidResponse updateConnection​(String serverName,
                                             String userId,
                                             String connectionGUID,
                                             boolean isMergeUpdate,
                                             ConnectionProperties requestBody)
        Update the metadata element representing a connection.
        Parameters:
        serverName - name of calling server
        userId - calling user
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        connectionGUID - unique identifier of the metadata element to update
        requestBody - new properties for this element
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • setupConnectorType

        public VoidResponse setupConnectorType​(String serverName,
                                               String userId,
                                               String connectionGUID,
                                               String connectorTypeGUID,
                                               NullRequestBody requestBody)
        Create a relationship between a connection and a connector type.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the connection in the external data manager
        connectorTypeGUID - unique identifier of the connector type in the external data manager
        requestBody - data manager identifiers
        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)
      • clearConnectorType

        public VoidResponse clearConnectorType​(String serverName,
                                               String userId,
                                               String connectionGUID,
                                               String connectorTypeGUID,
                                               NullRequestBody requestBody)
        Remove a relationship between a connection and a connector type.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the connection in the external data manager
        connectorTypeGUID - unique identifier of the connector type in the external data manager
        requestBody - data manager identifiers
        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)
      • setupEndpoint

        public VoidResponse setupEndpoint​(String serverName,
                                          String userId,
                                          String connectionGUID,
                                          String endpointGUID,
                                          NullRequestBody requestBody)
        Create a relationship between a connection and an endpoint.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the connection in the external data manager
        endpointGUID - unique identifier of the endpoint in the external data manager
        requestBody - data manager identifiers
        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)
      • clearEndpoint

        public VoidResponse clearEndpoint​(String serverName,
                                          String userId,
                                          String connectionGUID,
                                          String endpointGUID,
                                          NullRequestBody requestBody)
        Remove a relationship between a connection and an endpoint.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the connection in the external data manager
        endpointGUID - unique identifier of the endpoint in the external data manager
        requestBody - data manager identifiers
        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)
      • setupEmbeddedConnection

        public VoidResponse setupEmbeddedConnection​(String serverName,
                                                    String userId,
                                                    String connectionGUID,
                                                    String embeddedConnectionGUID,
                                                    EmbeddedConnectionRequestBody requestBody)
        Create a relationship between a virtual connection and an embedded connection.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the virtual connection in the external data manager
        embeddedConnectionGUID - unique identifier of the embedded connection in the external data manager
        requestBody - data manager identifiers and properties for the embedded connection
        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)
      • clearEmbeddedConnection

        public VoidResponse clearEmbeddedConnection​(String serverName,
                                                    String userId,
                                                    String connectionGUID,
                                                    String embeddedConnectionGUID,
                                                    NullRequestBody requestBody)
        Remove a relationship between a virtual connection and an embedded connection.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        connectionGUID - unique identifier of the virtual connection in the external data manager
        embeddedConnectionGUID - unique identifier of the embedded connection in the external data manager
        requestBody - data manager identifiers
        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)
      • setupAssetConnection

        public VoidResponse setupAssetConnection​(String serverName,
                                                 String userId,
                                                 String assetGUID,
                                                 String connectionGUID,
                                                 StringRequestBody requestBody)
        Create a relationship between an asset and its connection.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        assetGUID - unique identifier of the asset
        connectionGUID - unique identifier of the connection
        requestBody - data manager identifiers and asset summary
        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)
      • clearAssetConnection

        public VoidResponse clearAssetConnection​(String serverName,
                                                 String userId,
                                                 String assetGUID,
                                                 String connectionGUID,
                                                 NullRequestBody requestBody)
        Remove a relationship between an asset and its connection.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        assetGUID - unique identifier of the asset
        connectionGUID - unique identifier of the connection
        requestBody - data manager identifiers
        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)
      • removeConnection

        public VoidResponse removeConnection​(String serverName,
                                             String userId,
                                             String connectionGUID,
                                             NullRequestBody requestBody)
        Remove the metadata element representing a connection.
        Parameters:
        serverName - name of calling server
        userId - calling user
        connectionGUID - unique identifier of the metadata element to remove
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • findConnections

        public ConnectionsResponse findConnections​(String serverName,
                                                   String userId,
                                                   SearchStringRequestBody requestBody,
                                                   int startFrom,
                                                   int pageSize)
        Retrieve the list of connection metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getConnectionsByName

        public ConnectionsResponse getConnectionsByName​(String serverName,
                                                        String userId,
                                                        NameRequestBody requestBody,
                                                        int startFrom,
                                                        int pageSize)
        Retrieve the list of connection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getConnectionByGUID

        public ConnectionResponse getConnectionByGUID​(String serverName,
                                                      String userId,
                                                      String connectionGUID)
        Retrieve the connection metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of calling server
        userId - calling user
        connectionGUID - 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 make this request or PropertyServerException the repository is not available or not working properly.
      • createEndpoint

        public GUIDResponse createEndpoint​(String serverName,
                                           String userId,
                                           EndpointProperties endpointProperties)
        Create a new metadata element to represent an endpoint. Classifications can be added later to define the type of endpoint.
        Parameters:
        serverName - name of calling server
        userId - calling user
        endpointProperties - properties to store
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • createEndpointFromTemplate

        public GUIDResponse createEndpointFromTemplate​(String serverName,
                                                       String userId,
                                                       String networkAddress,
                                                       String templateGUID,
                                                       TemplateProperties templateProperties)
        Create a new metadata element to represent an endpoint using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new endpoint.
        Parameters:
        serverName - name of calling server
        userId - calling user
        networkAddress - location of the endpoint in the network
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • updateEndpoint

        public VoidResponse updateEndpoint​(String serverName,
                                           String userId,
                                           String endpointGUID,
                                           boolean isMergeUpdate,
                                           EndpointProperties endpointProperties)
        Update the metadata element representing a endpoint.
        Parameters:
        serverName - name of calling server
        userId - calling user
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        endpointGUID - unique identifier of the metadata element to update
        endpointProperties - new properties for this element
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • removeEndpoint

        public VoidResponse removeEndpoint​(String serverName,
                                           String userId,
                                           String endpointGUID,
                                           NullRequestBody requestBody)
        Remove the metadata element representing a endpoint.
        Parameters:
        serverName - name of calling server
        userId - calling user
        endpointGUID - unique identifier of the metadata element to remove
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • findEndpoints

        public EndpointsResponse findEndpoints​(String serverName,
                                               String userId,
                                               SearchStringRequestBody requestBody,
                                               int startFrom,
                                               int pageSize)
        Retrieve the list of endpoint metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getEndpointsByName

        public EndpointsResponse getEndpointsByName​(String serverName,
                                                    String userId,
                                                    NameRequestBody requestBody,
                                                    int startFrom,
                                                    int pageSize)
        Retrieve the list of endpoint metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getEndpointByGUID

        public EndpointResponse getEndpointByGUID​(String serverName,
                                                  String userId,
                                                  String endpointGUID)
        Retrieve the endpoint metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of calling server
        userId - calling user
        endpointGUID - 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 make this request or PropertyServerException the repository is not available or not working properly.
      • createConnectorType

        public GUIDResponse createConnectorType​(String serverName,
                                                String userId,
                                                ConnectorTypeProperties connectorTypeProperties)
        Create a new metadata element to represent a connectorType. Classifications can be added later to define the type of connectorType.
        Parameters:
        serverName - name of calling server
        userId - calling user
        connectorTypeProperties - properties to store
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • createConnectorTypeFromTemplate

        public GUIDResponse createConnectorTypeFromTemplate​(String serverName,
                                                            String userId,
                                                            String templateGUID,
                                                            TemplateProperties templateProperties)
        Create a new metadata element to represent a connectorType using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new connectorType.
        Parameters:
        serverName - name of calling server
        userId - calling user
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • updateConnectorType

        public VoidResponse updateConnectorType​(String serverName,
                                                String userId,
                                                String connectorTypeGUID,
                                                boolean isMergeUpdate,
                                                ConnectorTypeProperties connectorTypeProperties)
        Update the metadata element representing a connectorType.
        Parameters:
        serverName - name of calling server
        userId - calling user
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        connectorTypeGUID - unique identifier of the metadata element to update
        connectorTypeProperties - new properties for this element
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • removeConnectorType

        public VoidResponse removeConnectorType​(String serverName,
                                                String userId,
                                                String connectorTypeGUID,
                                                NullRequestBody requestBody)
        Remove the metadata element representing a connectorType.
        Parameters:
        serverName - name of calling server
        userId - calling user
        connectorTypeGUID - unique identifier of the metadata element to remove
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
      • findConnectorTypes

        public ConnectorTypesResponse findConnectorTypes​(String serverName,
                                                         String userId,
                                                         SearchStringRequestBody requestBody,
                                                         int startFrom,
                                                         int pageSize)
        Retrieve the list of connectorType metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getConnectorTypesByName

        public ConnectorTypesResponse getConnectorTypesByName​(String serverName,
                                                              String userId,
                                                              NameRequestBody requestBody,
                                                              int startFrom,
                                                              int pageSize)
        Retrieve the list of connectorType metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        serverName - name of calling server
        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 make this request or PropertyServerException the repository is not available or not working properly.
      • getConnectorTypeByGUID

        public ConnectorTypeResponse getConnectorTypeByGUID​(String serverName,
                                                            String userId,
                                                            String connectorTypeGUID)
        Retrieve the connectorType metadata element with the supplied unique identifier.
        Parameters:
        serverName - name of calling server
        userId - calling user
        connectorTypeGUID - 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 make this request or PropertyServerException the repository is not available or not working properly.