Start and stop the API Gateway

This topic describes how to start and stop the Node Manager and API Gateway instance on the command line, on all platforms. It also describes how to start the Policy Studio graphical tool. For details on API Gateway components and concepts, see the API Gateway Concepts Guide.

You can also start and stop API Gateway instances using the API Gateway Manager web console. For more details, see Manage API Gateway instances.

Prerequisites

Before you can start API Gateway, you must first create a new domain that includes an API Gateway instance. If you installed the QuickStart tutorial, a sample API Gateway domain is automatically configured in your installation. Otherwise, you must create a new domain. For more details, see Configure an API Gateway domain.

If you are using Apache Cassandra, before starting API Gateway, you must first ensure that Cassandra is running. For details on installing and running Cassandra, see the API Gateway Installation Guide.

Set passphrases

By default, data is stored unencrypted in the API Gateway configuration store. However, you can encrypt certain sensitive information such as passwords and private keys using a passphrase. When the passphrase has been set, this encrypts the API Gateway configuration data.

You must enter the passphrase when connecting to the API Gateway configuration data (for example, using the Policy Studio, or when the API Gateway starts up). For more details on configuring this passphrase, see Configure an API Gateway encryption passphrase.

Start the Node Manager

The following instructions describe how to start the Node Manager on the command line on Windows and UNIX:

Windows

Complete the following steps to start the Node Manager on Windows:

  1. Open a DOS prompt at the /Win32/bin directory of your API Gateway installation.
  2. Run the nodemanager file.
  3. If you are using an encryption passphrase, you are prompted for this passphrase. Enter the correct encryption passphrase, and press Return. For more details, see Configure an API Gateway encryption passphrase.

UNIX/Linux

To start the Node Manager on UNIX/Linux, complete the following instructions:

  1. Open a shell at the /posix/bin directoryof your API Gateway installation.
  2. Run the nodemanager.sh file, for example:
  3. If you are using an encryption passphrase, you are prompted for this passphrase. Enter the correct encryption passphrase and press Return. For more details, see Configure an API Gateway encryption passphrase.

Start the API Gateway instance

The following instructions describe how to start the API Gateway instance on the command line on Windows and UNIX:

Windows

Complete the following steps to start the API Gateway on Windows:

  1. Open a DOS prompt at the /Win32/bin directory of your API Gateway installation.
  2. Use the startinstance command to start the API Gateway, for example:
  3. If you are using an encryption passphrase, you are prompted for this passphrase. Enter the correct encryption passphrase, and press Return. For more details, see Set passphrases.
  4. When the API Gateway has successfully started up, you can run the policystudio.exe file from your Policy Studio installation directory.
  5. When the Policy Studio is starting up, you are prompted for connection details for the API Gateway. For more details, see Connect to the API Gateway in Policy Studio.

UNIX/Linux

To start the API Gateway instance and the Policy Studio on UNIX/Linux, perform the following steps:

  1. Open a shell at the /posix/bin directoryof your API Gateway installation.
  2. Use the startinstance command to start the API Gateway, for example:
  3. Note   You must ensure that the startinstance file has execute permissions.
  4. If you are using an encryption passphrase, you are prompted for this passphrase. Enter the correct encryption passphrase and press Return. For more details, see Set passphrases.
  5. When the API Gateway has successfully started up, run thepolicystudio.sh file in your Policy Studio installation directory. For example:
  6. When the Policy Studio is starting up, you are prompted for connection details for the API Gateway.
Tip   You can enter the startinstance command without any arguments to display the servers registered on the machine. For example:

If you have a single API Gateway instance on the host on which you run startinstance , that instance starts when you specify no arguments.

Startup options

You can specify the following optional instance arguments to the startinstance command:

Option Description
-b <file> Specifies the boot-time trace destination.
-d Runs as daemon/service (UNIX only).
-h <directory> Specifies the service instance directory.
-k Kills the instance (UNIX only).
-P Prompts for a passphrase at startup.
-q Runs in quiet mode (equivalent to -Dquiet).
-v Changes to the installation instance directory on startup.
-s Tests if the service is running (UNIX only).
-e Specifies the end of arguments for vshell.
-D prop[=value] Sets a configuration file property.

UNIX/Linux

The -d , -s and -k options on UNIX are designed for use with the service controller (for example, traditional SVR4 init, systemd, upstart, and so on). The -d option waits until the service is running before returning, and -k waits for the process to terminate. This means that when used in a script, the completion of the command indicates that the operation requested has completed.

If the service is running, -s will exit with a 0 status code, and with 1 otherwise. For example, you can use the following to print a message if the service is running:

Windows

The Service Control Manager (SCM) on Windows requires more direct interaction with the process than on UNIX. The product will run as a service, but needs to be started by the SCM.

The -d and -k options can be used internally as part of the SCM interaction, but are not for interactive use on Windows. These are used to differentiate between a command-line startup and a startup from the SCM. -s is not implemented on Windows. When installed as a service, you can control and query the API Gateway using the SCM (for example, using the applet, or the net or sc commands).

Connect to the API Gateway in Policy Studio

When starting the Policy Studio, you are prompted for details on how to connect to the Admin Node Manager (for example, the server session, host, port, user name, and password). The default connection URL is:

HOST is the IP address or host name of the machine on which the API Gateway runs. For more details, see the API Gateway Policy Developer Guide.

Stop the API Gateway

The following instructions describe how to stop the API Gateway instance on the command line on Windows and UNIX:

UNIX/Linux

To stop the API Gateway instance, you must specify the group and instance name to the startinstance command along with the -k option. For example:

Windows

To stop the API Gateway instance, you can enter Ctrl-C on the command prompt. If the API Gateway instance is installed as a Windows service, you should use the Windows Services tool.

Stop the Node Manager

The following instructions describe how to stop the Node Manager instance on the command line on Windows and UNIX:

UNIX/Linux

To stop the Node Manager, you must specify the nodemanager command along with the -k option. For example:

Windows

To stop the Node Manager, you can enter Ctrl-C on the command prompt. If the Node Manager is installed as a Windows service, you should use the Windows Services tool.

Related Links