Get Ready for REST
REST API usage prerequisites are described in this section. These prerequisites will enable REST v3 applications to run with Accelerator. Some of the prerequisites apply to the Accelerator queue configuration and others apply to the host where the REST application will run, also called the "REST client".
- The web port must be configured. In version 2021.2.0 through 2022.1.1, the
web provider must be set to "internal". See the
-webport
and-webprovider
options in the -h help screen documentation for VOV project start commands like ncmgr start and lmmgr start. - Optional: SSL/TLS should be enabled for security reasons. Since
passwords are passed with HTTP authorization requests to vovserver, the
security of the connection is important. Enable SSL/TLS for the NC queue as
follows:
- Add this line to
SWD/policy.tcl:
set config(ssl.enable) 1
- If REST requests will be sent from Python scripts running on CentOS
7 or earlier, TLS 1.2 will be used by the REST application you are
writing. Configure vovserver to accept TLS 1.2 protocol by adding
the following line to
SWD/policy.tcl:
set config(http.minSSLVersion) "TLSv1.2"
- Optional: Append a line to SWD/setup.tcl
that sets VOV_HOST_HTTP_NAME to the fully qualified host name (FQHN)
where vovserver is running. The FQHN is the output of
hostname -f
.setenv VOV_HOST_HTTP_NAME FQHN
- Optional: For a full HTTPS security, a CA-signed domain-wide SSL certificate is installed in $VOVDIR/local/ssl or a host-specific CA-signed SSL certificate is installed in SWD/config/ssl. This will allow your REST network traffic to be fully secured. See Advanced REST Usage for more about this.
- Reread and activate the changed server configuration parameters via vovproject reread or similar commands.
- Add this line to
SWD/policy.tcl:
- The REST client must have network access to the server running the NC queue.
- Python version 3 or higher is required to use the vov_rest_v3.py REST access library module.
- Copy vov_rest_v3.py from $VOVDIR/scripts/python/vov_rest_v3.py to the directory on the REST client where your Python application resides.
- The following Python request packages must be installed:
json
,nacl.utils
, andurllib