UOA:CFGRESTSRV
Generate Server Instance (CFGRESTSRV) - Help
CFGRESTSRV ACTC(*ADD|*DELETE) SERVER(*TDOMS|<server-name>) ROOT(*WWW) SSL(*ONLY|*YES|*NO) PORT(45810) SSLPORT(<https-portnumber>) SSLAPP('REMAINSOFTWARE.COM') START(*YES|*NO) USER(<user-id>) TMPLF(*DFT|<library>/<file>) TMPLMBR(*DFT|<member>) GENLIB(*OMSLIB|<generator-library>) TRGLIB(<oms-libray> <other-library> ...) LIBL(<oms-libray> <other-libray> ...)
Generate Server Instance (CFGRESTSRV)
This command is used to create a new or delete an existing apache HTTP server instance for the TD/OMS REST Server. You can create multiple instances for multiple TD/OMS installations.
The server is configured using a configuration template file. A default template file can be found in the QUSRSRC.RESTGENCFG file of your TD/OMS library.
You can also use this command to create your own apache instances when you provide your own template file.
You can use this to quickly add and remove server instances for example to create microservices, but also to create test and development instances.
A server can be generated and removed on the fly.
Action code (ACTC)
Specify the action to be performed on the apache server instance. The possible values are:
- *ADD
- Use this action code to create a new apache HTTP server instance.
- *DELETE
- Use this action code to delete an existing apache HTTP server instance.
Server name (SERVER)
Specify the new server instance name. This is the identification of the server and it can be found in the administration function of the server. The server name may also be used to remove the server configuration.
- TDOMS
- Use the default TDOMS name for the TD/OMS rest server.
- Character value
- Specify the name of the server instance.
Server document root (ROOT)
Specify the server root. The server root is a directory (a folder) that is stored on the host's server and that is designated to store apache configurations. The default server root is the "/www" directory, but you may use a different directory.
- *WWW
- The server instance would be /www/servername
- document root
- Please specify the document root. Be careful when not using the default.
Activate SSL (SSL)
Specify whether SSL must be activated so that the server can be reached through https.
- *ONLY
- SSL is active and the server can only be reached through https. This is the recommended setting. Also specify the SSL application and the SSL port.
- *NO
- SSL is not active and the server can only be reached through http.
- *YES
- HTTP and HTTPS are both active. Also specify the SSL application and the SSL port.
Port number (PORT)
Specify the port number. Port number is a communication endpoint. A port number is always associated with an IP address of a host. A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535.
- 45010
- Use the default 45010 port
- port-number
- Specify the port number to be used for SSL.
The port number is a communication endpoint. A port number is always associated with an IP address of a host. A port number is a 16-bit unsigned integer, thus ranging from 1 to 65535. It is not recommended to use a port number below 1024 because these are reserved ports. If you don't know what port to use, use a port in the range of 45000 to 45999. If you use port 45010, the server would be reachable on the following paths:
http://host:45010/<target library>/<program>/path
SSL Port (SSLPORT)
Specify the port over which to serve SSL traffic. See the PORT parameter for more information.
- 45011
- Use the default 45011 port.
- port-number
- Specify the port number to be used for SSL.
SSL Application (SSLAPP)
Specify the configure SSL application to use for the SSL traffic. The SSL application must be defined using the IBM i DCM. Search the internet using "DCM application definitions ibm i" to find documents related to the configuration of SSL applications.
Start TCP/IP Server (START)
Use this parameter to determine whether to start and autostart the http server instance after creation.
The possible values are:
- *YES
- The server will be started and the autostart flag will be set so that the server is automatically started when the TCP servers are started (e.g. after an IPL).
- *NO
- The server will not be started.
User (USER)
Specify a valid user ID. This is the user that will be running the server job. In general it is advised to use a user with limited system access. User OMS is a good choice for the TD/OMS REST server.
The possible values are:
- OMS
- User OMS will be used.
- Name
- Specify the ID of the user to use for the server job.
Name
Configuration Template File (TMPLF)
Specify the name of the configuration template source file. The possible values are:
- *DFT
- If *DFT is specified then it will pick the default configuration template source file *LIBL/QUSRSRC..
- source-file
- Specify the name of the configuration template source file.
- source-library
- Specify the name of the configuration template source library.
Configuration Template Member (TMPLMBR)
Specify the name of the configuration template source member. The possible values are:
- *DFT
- If *DFT is specified then it will pick the default configuration template source member RESTGENCFG.
- source-member
- Specify the name of the configuration template source member.
Generate library (GENLIB)
Specify the target library which contains the generated CGI program. The possible values are:
- *OMSLIB
- The command will search for the correct library.
- library-name
- Specify the library name which contains the generator program.
Target library (TRGLIB)
Specify the target library which contains the generated CGI program.
Library list (LIBLIST)
Specify the library list for the webserver. The listed libraries replace the libraries in the user part of the library list. When the CGI program has finished processing, these libraries will be removed from the library list and the library list will be restored to what it was before the CGI program ran.