Class ConnectionsBuildingResource
java.lang.Object
org.odpi.openmetadata.accessservices.assetowner.server.spring.ConnectionsBuildingResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-owner/users/{userId}")
public class ConnectionsBuildingResource
extends Object
ConnectionsBuildingResource provides the API operations to create and maintain connections.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclearAssetConnection
(String serverName, String userId, String assetGUID, String connectionGUID, NullRequestBody requestBody) Remove a relationship between an asset and its connection.clearConnectorType
(String serverName, String userId, String connectionGUID, String connectorTypeGUID, NullRequestBody requestBody) Remove a relationship between a connection and a connector type.clearEmbeddedConnection
(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, NullRequestBody requestBody) Remove a relationship between a virtual connection and an embedded connection.clearEndpoint
(String serverName, String userId, String connectionGUID, String endpointGUID, NullRequestBody requestBody) Remove a relationship between a connection and an endpoint.createConnection
(String serverName, String userId, ConnectionProperties requestBody) Create a new metadata element to represent a connection.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.createEndpoint
(String serverName, String userId, EndpointProperties endpointProperties) Create a new metadata element to represent a endpoint.createEndpointFromTemplate
(String serverName, String userId, String networkAddress, String templateGUID, TemplateProperties templateProperties) Create a new metadata element to represent a endpoint using an existing metadata element as a template.findConnections
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connection metadata elements that contain the search string.findConnectorTypes
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connectorType metadata elements that contain the search string.findEndpoints
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of endpoint metadata elements that contain the search string.getConnectionByGUID
(String serverName, String userId, String connectionGUID) Retrieve the connection metadata element with the supplied unique identifier.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.getConnectorTypeByGUID
(String serverName, String userId, String connectorTypeGUID) Retrieve the connectorType metadata element with the supplied unique identifier.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.getEndpointByGUID
(String serverName, String userId, String endpointGUID) Retrieve the endpoint metadata element with the supplied unique identifier.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.removeConnection
(String serverName, String userId, String connectionGUID, NullRequestBody requestBody) Remove the metadata element representing a connection.removeEndpoint
(String serverName, String userId, String endpointGUID, NullRequestBody requestBody) Remove the metadata element representing a endpoint.setupAssetConnection
(String serverName, String userId, String assetGUID, String connectionGUID, StringRequestBody requestBody) Create a relationship between an asset and its connection.setupConnectorType
(String serverName, String userId, String connectionGUID, String connectorTypeGUID, NullRequestBody requestBody) Create a relationship between a connection and a connector type.setupEmbeddedConnection
(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, EmbeddedConnectionRequestBody requestBody) Create a relationship between a virtual connection and an embedded connection.setupEndpoint
(String serverName, String userId, String connectionGUID, String endpointGUID, NullRequestBody requestBody) Create a relationship between a connection and an endpoint.updateConnection
(String serverName, String userId, String connectionGUID, boolean isMergeUpdate, ConnectionProperties requestBody) Update the metadata element representing a connection.updateEndpoint
(String serverName, String userId, String endpointGUID, boolean isMergeUpdate, EndpointProperties endpointProperties) Update the metadata element representing a endpoint.
-
Constructor Details
-
ConnectionsBuildingResource
public ConnectionsBuildingResource()Default constructor
-
-
Method Details
-
createConnection
@PostMapping(path="/connections") public GUIDResponse createConnection(@PathVariable String serverName, @PathVariable String userId, @RequestBody ConnectionProperties requestBody) Create a new metadata element to represent a connection.- Parameters:
serverName
- name of calling serveruserId
- calling userrequestBody
- 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
@PostMapping(path="/connections/from-template/{templateGUID}") public GUIDResponse createConnectionFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, @RequestBody 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 serveruserId
- calling usertemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- 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
@PostMapping(path="/connections/{connectionGUID}/update") public VoidResponse updateConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @RequestParam boolean isMergeUpdate, @RequestBody ConnectionProperties requestBody) Update the metadata element representing a connection.- Parameters:
serverName
- name of calling serveruserId
- calling userisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?connectionGUID
- unique identifier of the metadata element to updaterequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/connector-types/{connectorTypeGUID}") public VoidResponse setupConnectorType(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, @RequestBody(required=false) 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 userconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data managerrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/connector-types/{connectorTypeGUID}/delete") public VoidResponse clearConnectorType(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, @RequestBody(required=false) 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 userconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data managerrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/endpoints/{endpointGUID}") public VoidResponse setupEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, @RequestBody(required=false) NullRequestBody requestBody) Create a relationship between a connection and an endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data managerrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/endpoints/{endpointGUID}/delete") public VoidResponse clearEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, @RequestBody(required=false) NullRequestBody requestBody) Remove a relationship between a connection and an endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data managerrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/embedded-connections/{embeddedConnectionGUID}") public VoidResponse setupEmbeddedConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String embeddedConnectionGUID, @RequestBody 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 userconnectionGUID
- unique identifier of the virtual connection in the external data managerembeddedConnectionGUID
- unique identifier of the embedded connection in the external data managerrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/embedded-connections/{embeddedConnectionGUID}/delete") public VoidResponse clearEmbeddedConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String embeddedConnectionGUID, @RequestBody(required=false) 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 userconnectionGUID
- unique identifier of the virtual connection in the external data managerembeddedConnectionGUID
- unique identifier of the embedded connection in the external data managerrequestBody
- 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
@PostMapping(path="/assets/{assetGUID}/connections/{connectionGUID}") public VoidResponse setupAssetConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @PathVariable String connectionGUID, @RequestBody(required=false) StringRequestBody requestBody) Create a relationship between an asset and its connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userassetGUID
- unique identifier of the assetconnectionGUID
- unique identifier of the connectionrequestBody
- 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
@PostMapping(path="/assets/{assetGUID}/connections/{connectionGUID}/delete") public VoidResponse clearAssetConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @PathVariable String connectionGUID, @RequestBody(required=false) NullRequestBody requestBody) Remove a relationship between an asset and its connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userassetGUID
- unique identifier of the assetconnectionGUID
- unique identifier of the connectionrequestBody
- 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
@PostMapping(path="/connections/{connectionGUID}/delete") public VoidResponse removeConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, @RequestBody(required=false) NullRequestBody requestBody) Remove the metadata element representing a connection.- Parameters:
serverName
- name of calling serveruserId
- calling userconnectionGUID
- unique identifier of the metadata element to removerequestBody
- 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
@PostMapping(path="/connections/by-search-string") public ConnectionsResponse findConnections(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- 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
@PostMapping(path="/connections/by-name") public ConnectionsResponse getConnectionsByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- 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
@GetMapping(path="/connections/{connectionGUID}") public ConnectionResponse getConnectionByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID) Retrieve the connection metadata element with the supplied unique identifier.- Parameters:
serverName
- name of calling serveruserId
- calling userconnectionGUID
- 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
@PostMapping(path="/endpoints") public GUIDResponse createEndpoint(@PathVariable String serverName, @PathVariable String userId, @RequestBody EndpointProperties endpointProperties) Create a new metadata element to represent a endpoint. Classifications can be added later to define the type of endpoint.- Parameters:
serverName
- name of calling serveruserId
- calling userendpointProperties
- 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
@PostMapping(path="/endpoints/network-address/{networkAddress}/from-template/{templateGUID}") public GUIDResponse createEndpointFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String networkAddress, @PathVariable String templateGUID, @RequestBody TemplateProperties templateProperties) Create a new metadata element to represent a 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 serveruserId
- calling usernetworkAddress
- location of the endpoint in the networktemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- 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
@PostMapping(path="/endpoints/{endpointGUID}/update") public VoidResponse updateEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, @RequestParam boolean isMergeUpdate, @RequestBody EndpointProperties endpointProperties) Update the metadata element representing a endpoint.- Parameters:
serverName
- name of calling serveruserId
- calling userisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?endpointGUID
- unique identifier of the metadata element to updateendpointProperties
- 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
@PostMapping(path="/endpoints/{endpointGUID}/delete") public VoidResponse removeEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, @RequestBody(required=false) NullRequestBody requestBody) Remove the metadata element representing a endpoint.- Parameters:
serverName
- name of calling serveruserId
- calling userendpointGUID
- unique identifier of the metadata element to removerequestBody
- 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
@PostMapping(path="/endpoints/by-search-string") public EndpointsResponse findEndpoints(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- 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
@PostMapping(path="/endpoints/by-name") public EndpointsResponse getEndpointsByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- 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
@GetMapping(path="/endpoints/{endpointGUID}") public EndpointResponse getEndpointByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID) Retrieve the endpoint metadata element with the supplied unique identifier.- Parameters:
serverName
- name of calling serveruserId
- calling userendpointGUID
- 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.
-
findConnectorTypes
@PostMapping(path="/connector-types/by-search-string") public ConnectorTypesResponse findConnectorTypes(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- 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
@PostMapping(path="/connector-types/by-name") public ConnectorTypesResponse getConnectorTypesByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 serveruserId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- 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
@GetMapping(path="/connector-types/{connectorTypeGUID}") public ConnectorTypeResponse getConnectorTypeByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectorTypeGUID) Retrieve the connectorType metadata element with the supplied unique identifier.- Parameters:
serverName
- name of calling serveruserId
- calling userconnectorTypeGUID
- 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.
-