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, @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 name
      delegatingUserId - 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 services
      delegatingUserId - external userId making request
      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, @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 name
      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.
    • 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 name
      delegatingUserId - 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 name
      delegatingUserId - 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 request
      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, @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 request
      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.