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 Details

    • OMAGServerOperationResource

      public OMAGServerOperationResource()
  • Method Details

    • activateWithStoredConfig

      @PostMapping(path="/servers/{serverName}/instance") public SuccessMessageResponse activateWithStoredConfig(@PathVariable String serverName)
      Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.
      Parameters:
      serverName - 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 serverName, @RequestBody OMAGServerConfig configuration)
      Activate the open metadata and governance services using the supplied configuration document.
      Parameters:
      configuration - properties used to initialize the services
      serverName - 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)
      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()
      Temporarily shutdown all running servers.
      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)
      Permanently deactivate any active servers and unregister from any cohorts.
      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.
    • shutdownAndUnregisterAllServers

      @DeleteMapping(path="/servers") public VoidResponse shutdownAndUnregisterAllServers()
      Shutdown any active servers and unregister them from any cohorts.
      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()
      Shutdown the platform.
      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)
      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 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 serverName)
      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 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 serverName, @RequestBody String fileName)
      Add a new open metadata archive to running repository.
      Parameters:
      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 serverName, @RequestBody Connection connection)
      Add a new open metadata archive to running repository.
      Parameters:
      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.