Class OMAGServerOperationResource
java.lang.Object
org.odpi.openmetadata.platformservices.server.spring.OMAGServerOperationResource
@RestController
@RequestMapping("/open-metadata/platform-services/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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateWithStoredConfig(String serverName, String delegatingUserId) Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.activateWithSuppliedConfig(String serverName, String delegatingUserId, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.addOpenMetadataArchive(String serverName, String delegatingUserId, Connection connection) Add a new open metadata archive to running repository.addOpenMetadataArchiveFile(String serverName, String delegatingUserId, String fileName) Add a new open metadata archive to running repository.getActiveConfiguration(String serverName, String delegatingUserId) Return the configuration used for the current active instance of the server.getActiveServerStatus(String serverName, String delegatingUserId) Return the status for the current active instance of the server.shutdownAllServers(String delegatingUserId) Temporarily shutdown all running servers.shutdownAndUnregisterAllServers(String delegatingUserId) Shutdown any active servers and unregister them from any cohorts.shutdownAndUnregisterServer(String serverName, String delegatingUserId) Permanently deactivate any active servers and unregister from any cohorts.shutdownPlatform(String delegatingUserId) Shutdown the platform.shutdownServer(String serverName, String delegatingUserId) Temporarily shutdown the named OMAG server.
-
Constructor Details
-
OMAGServerOperationResource
public OMAGServerOperationResource()
-
-
Method Details
-
activateWithStoredConfig
@PostMapping(path="/servers/{serverName}/instance") public SuccessMessageResponse activateWithStoredConfig(@PathVariable String serverName, @RequestParam(required=false) String delegatingUserId) Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- 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 serverName, @RequestParam(required=false) String delegatingUserId, @RequestBody OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.- Parameters:
configuration- properties used to initialize the servicesdelegatingUserId- external userId making 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.
-
shutdownServer
@DeleteMapping(path="/servers/{serverName}/instance") public VoidResponse shutdownServer(@PathVariable String serverName, @RequestParam(required=false) String delegatingUserId) Temporarily shutdown the named OMAG server. This server can be restarted as a later time.- Parameters:
serverName- 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(@RequestParam(required=false) String delegatingUserId) Temporarily shutdown all running servers.- Parameters:
delegatingUserId- external userId making 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 serverName, @RequestParam(required=false) String delegatingUserId) Permanently deactivate any active servers and unregister from any cohorts.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- 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(@RequestParam(required=false) String delegatingUserId) Shutdown any active servers and unregister them from any cohorts.- Parameters:
delegatingUserId- external userId making request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownPlatform
@DeleteMapping(path="/instance") public VoidResponse shutdownPlatform(@RequestParam(required=false) String delegatingUserId) Shutdown the platform.- Parameters:
delegatingUserId- external userId making 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 serverName, @RequestParam(required=false) String delegatingUserId) Return the configuration used for the current active instance of the server. Null is returned if the server instance is not running.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- 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 serverName, @RequestParam(required=false) String delegatingUserId) Return the status for the current active instance of the server. Null is returned if the server instance is not running.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- 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 serverName, @RequestParam(required=false) String delegatingUserId, @RequestBody String fileName) Add a new open metadata archive to running repository.- Parameters:
serverName- local server name.delegatingUserId- external userId making requestfileName- 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 serverName, @RequestParam(required=false) String delegatingUserId, @RequestBody Connection connection) Add a new open metadata archive to running repository.- Parameters:
serverName- local server name.delegatingUserId- external userId making requestconnection- 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.
-