Class OMAGServerOperationResource
java.lang.Object
org.odpi.openmetadata.platformservices.server.spring.OMAGServerOperationResource
@RestController
@RequestMapping("/open-metadata/platform-services/users/{userId}/server-platform")
public class OMAGServerOperationResource
extends Object
OMAGServerOperationResource provides the REST API for controlling the start-up, management and
shutdown of services in the OMAG Server.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivateWithStoredConfig
(String userId, String serverName) Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.activateWithSuppliedConfig
(String userId, String serverName, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.addOpenMetadataArchive
(String userId, String serverName, Connection connection) Add a new open metadata archive to running repository.addOpenMetadataArchiveFile
(String userId, String serverName, String fileName) Add a new open metadata archive to running repository.getActiveConfiguration
(String userId, String serverName) Return the configuration used for the current active instance of the server.getActiveServerStatus
(String userId, String serverName) Return the status for the current active instance of the server.shutdownAllServers
(String userId) Temporarily shutdown all running servers.Shutdown any active servers and unregister them from any cohorts.shutdownAndUnregisterServer
(String userId, String serverName) Permanently deactivate any active servers and unregister from any cohorts.shutdownPlatform
(String userId) Shutdown the platform.shutdownServer
(String userId, String serverName) Temporarily shutdown the named OMAG server.
-
Constructor Details
-
OMAGServerOperationResource
public OMAGServerOperationResource()
-
-
Method Details
-
activateWithStoredConfig
@PostMapping(path="/servers/{serverName}/instance") public SuccessMessageResponse activateWithStoredConfig(@PathVariable String userId, @PathVariable String serverName) Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Parameters:
userId
- user that is issuing the requestserverName
- local server name- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
activateWithSuppliedConfig
@PostMapping(path="/servers/{serverName}/instance/configuration") public SuccessMessageResponse activateWithSuppliedConfig(@PathVariable String userId, @PathVariable String serverName, @RequestBody OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.- Parameters:
userId
- user that is issuing the requestconfiguration
- properties used to initialize the servicesserverName
- local server name- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
shutdownServer
@DeleteMapping(path="/servers/{serverName}/instance") public VoidResponse shutdownServer(@PathVariable String userId, @PathVariable String serverName) Temporarily shutdown the named OMAG server. This server can be restarted as a later time.- Parameters:
userId
- user that is issuing the requestserverName
- local server name- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownAllServers
@DeleteMapping(path="/servers/instance") public VoidResponse shutdownAllServers(@PathVariable String userId) Temporarily shutdown all running servers.- Parameters:
userId
- user that is issuing the request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownAndUnregisterServer
@DeleteMapping(path="/servers/{serverName}") public VoidResponse shutdownAndUnregisterServer(@PathVariable String userId, @PathVariable String serverName) Permanently deactivate any active servers and unregister from any cohorts.- Parameters:
userId
- user that is issuing the requestserverName
- local server name- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownAndUnregisterAllServers
@DeleteMapping(path="/servers") public VoidResponse shutdownAndUnregisterAllServers(@PathVariable String userId) Shutdown any active servers and unregister them from any cohorts.- Parameters:
userId
- user that is issuing the request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownPlatform
Shutdown the platform.- Parameters:
userId
- user that is issuing the request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
getActiveConfiguration
@GetMapping(path="/servers/{serverName}/instance/configuration") public OMAGServerConfigResponse getActiveConfiguration(@PathVariable String userId, @PathVariable String serverName) Return the configuration used for the current active instance of the server. Null is returned if the server instance is not running.- Parameters:
userId
- user that is issuing the requestserverName
- local server name- Returns:
- configuration properties used to initialize the server or null if not running or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
getActiveServerStatus
@GetMapping(path="/servers/{serverName}/instance/status") public OMAGServerStatusResponse getActiveServerStatus(@PathVariable String userId, @PathVariable String serverName) Return the status for the current active instance of the server. Null is returned if the server instance is not running.- Parameters:
userId
- user that is issuing the requestserverName
- local server name- Returns:
- status of the server or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or not running or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
addOpenMetadataArchiveFile
@PostMapping(path="/servers/{serverName}/instance/open-metadata-archives/file") public VoidResponse addOpenMetadataArchiveFile(@PathVariable String userId, @PathVariable String serverName, @RequestBody String fileName) Add a new open metadata archive to running repository.- Parameters:
userId
- user that is issuing the request.serverName
- local server name.fileName
- name of the open metadata archive file.- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName or fileName parameter.
-
addOpenMetadataArchive
@PostMapping(path="/servers/{serverName}/instance/open-metadata-archives/connection") public VoidResponse addOpenMetadataArchive(@PathVariable String userId, @PathVariable String serverName, @RequestBody Connection connection) Add a new open metadata archive to running repository.- Parameters:
userId
- user that is issuing the request.serverName
- local server name.connection
- connection for the open metadata archive.- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName or connection parameter.
-