API Server Startup Options

Before starting API Server, you can add the following options either as environment variables or as Java system properties to the Java command line for your server:
lac42
Before starting API Server, you can add the following options either as environment variables or as Java system properties to the Java command line for your server:
If you want to
Add this option
Notes
Install the API Server license when you start your server
LAC_DEFAULT_LICENSE_FILE
Set the value for this option as the complete path to a valid license file.
 
Example value:
 
/Users/jdoe/LACLicense.txt
 
After 
CA Live API Creator
 has started the first time, we recommend that you remove this environment variable. 
For more information about how to install the license, see Import the API Server License.
Set the initial password for the system administrator (
sa
) user when you start your server
LAC_INITIAL_SA_PASSWORD
 
Prerequisite:
 Your admin repository is empty. Your admin repository is initialized when you start API Server the first time.
 
Example value:
 
secret
 
 
Example:
 
The following example sets the password for the system administrator (
sa
) user to MySAPassword:
LAC_INITIAL_SA_PASSWORD=<MySAPassword>
After you have set the initial password for the system administrator (
sa
) user and 
CA Live API Creator
 has started the first time, we recommend that you remove this environment variable.
Set the password for the initial API developer (a TeamSpace user) for the
default
TeamSpace when you start your server
LAC_INITIAL_ADMIN_PASSWORD
 
Prerequisite:
 Your admin repository is empty. Your admin repository is initialized when you start API Server the first time.
The value for this option is the default password for the initial API developer (a TeamSpace user). You can change the password for the TeamSpace user at any point.
For more information about how to change passwords for TeamSpace users, see Manage TeamSpace Users.
Set the URL fragment for the
default
TeamSpace
LAC_INITIAL_ACCOUNT_URL_NAME
 
Prerequisite:
 Your admin repository is empty. Your admin repository is initialized when you start API Server the first time.
 
Default value:
 
default
 
Set the name of the
default
TeamSpace
LAC_INITIAL_ACCOUNT_NAME
 
Prerequisite:
 Your admin repository is empty. Your admin repository is initialized when you start API Server the first time
 
Default value:
<
URL fragment>
account
Bypass the API Creator screen that asks the initial TeamSpace user to log in to accept the user license, which pre-accepts the End User License Agreement (EULA)
 
ca_accept_license
 
 
Example value:
 
ENU
 
 
Example:
 
The following example accepts the EULA for 
ENU
:
ca_accept_license=ENU
Set the unique identifier for this specific server instance
LAC_SERVER_IDENT
In a cluster, each server must have a unique ID, which is by default a UUID. You can give each server a friendlier name by adding this option before starting your server. Enter a unique name for each server in the cluster.
 
Example:
 
The following example sets the server name to 
Server42
:
LAC_SERVER_IDENT=Server42
For more information about the location of the file that contains the unique identifier for a server instance, see View your API Definition.
Set the absolute path of the logging configuration file
LAC_LOGGING_CONFIG_FILE
 
Example:
 
-DLAC_LOGGING_CONFIG_FILE=/<path_to_your_logging_configuration_file>/<configuration_file_name>
For more information about the syntax for this option, see External Logging.
Prevent log injection
LAC_LOG_ENCODING_REQUIRED
Prevent log injection by enabling log encoding.
 
 
Values:
 
  •  
    true
    : Enables log encoding.
  •  
    false
    : Disables log encoding.
 
Default value: 
 
false
 
 
Example:
 
The following example enables log encoding: 
<...Java container startup...> -DLAC_LOG_ENCODING_REQUIRED=true
For more information about how to prevent log injection, see External Logging.
Set the location for your admin repository
LAC_REPOSITORY_ROOT
Set the value for this option as the complete path to your admin repository.
 
Default:
 ~
/CALIveAPICreator.repository
 
Example:
 
The following example sets the location for your admin repository when you have installed 
CA Live API Creator
 to run on the Apache Tomcat Java container: 
<...Java container startup...> -DLAC_REPOSITORY_ROOT=${HOME}/CALiveAPICreator.repository
For more information about the admin repository, see View your API Definition.
Set the location (URL or Git) from which 
CA Live API Creator
 pulls your admin repository
LAC_REPOSITORY_CONFIGURATION_URL
By default, when you first start API Server, API Server pulls your admin repository from the location that you set using the 
LAC_REPOSITORY_ROOT
 option. You can change this location by adding this option before starting your server.
Set the value for this option as the complete path to the location.
 
Example value: 
 
https://s3-us-west-1.amazonaws.com/mybucket/myRepository.zip
 
 
Example:
 
LAC_REPOSITORY_CONFIGURATION_URL= https://s3-us-west-1.amazonaws.com/mybucket/myRepository.zip
Have your server back up what is in memory
LAC_REPOSITORY_BACKUP
Each time a TeamSpace user changes API metadata, API Server saves a backup of the changes to your API definitions to your 
backups/timeline
 directory. By default, API Server retains these backups for ten days of development activities.
 
Values:
true
or
false
 
Default:
false
 
Example:
 
The following example sets to have your server back up what is in memory when you start your server:
LAC_REPOSITORY_BACKUP=true
You can restore from a backup. For more information, see Revert Changes from a Backup.
 
CA Live API Creator
 does not require backups of your admin repository when you start API Server or if you change your API during runtime. Consider excluding this option in your test and production environments.
Set the number of days your server retains backups
 
LAC_REPOSITORY_BACKUP_DAYS_TO_KEEP
 
The number of days in which you have changed API metadata and you want API Server to retain a backup of what is in memory. The value for this system property must be a number.
 
Default value:
 
10
 
 
Example:
 
LAC_REPOSITORY_BACKUP_DAYS_TO_KEEP=30
(In production environments) Prevent API Server from writing to disk the changes that you make to the admin repository.
 
LAC_REPOSITORY_DISABLE
 
Set the value for this option to have API Server bootstrap the server instance to the admin repository (the location that you set using the 
LAC_REPOSITORY_CONFIGURATION_URL
 option).
 
Values:
 
  •  
    true
    : API Server writes to disk the changes that you make to the admin repository. 
  •  
    false
    : API Server does not write to disk the changes that you make to the admin repository.
 
Default: 
 
false
 
 
Example:
 
LAC_REPOSITORY_DISABLE=true
Set the cluster synchronization strategy
LAC_CLUSTER_SYNC_STRATEGY
If you plan to use timers or MQTT listeners that rely on cluster synchronization, you must add this option each time you start API Server.
 
Values:
 
  •  
    in_memory
    : Nodes assign themselves identification numbers that are based on the order in which the Hazelcast cluster initializes the nodes. Hazelcast makes decisions using these ID numbers.
  •  
    in_memory_with_locking
    CA Live API Creator
     uses a shared map to hold a mutex that the active nodes refer to before making decisions.
 
Example:
 
LAC_CLUSTER_SYNC_STRATEGY=in_memory_with_locking
For more information about how to set the cluster configuration strategy, see Configure to Run as a Cluster.
Assign the path of the Hazelcast configuration XML file when determining how nodes discover each other in a cluster
hazelcast.config
Set the value for this option as the complete path to the file.
 
 
 
Example:
 
hazelcast.config=/foo/bar/hazelcast.xml
For more information about how to determine how nodes discover each other in a cluster, see Configure to Run as a Cluster.
Access the in-memory Derby database.
 
LAC_DERBY_SERVER_PORT
 
This option is only for advanced users. Add this option only if you are performing advanced troubleshooting and require access to the in-memory Derby database from a database client tool.
By default, API users cannot access the in-memory Derby database. Set the value for this option as the port number on which you access the database. For example, if you set the value for this option to 1527, then you can access the database using the following URL:
jdbc:derby://localhost:1527/memory:AdminDB
This option requires that you also add the option to set the network on which to start API Server (the 
LAC_DERBY_SERVER_HOST
 option).
 A username and password are required to access the in-memory Derby database. Any username and password combination works.
 
Example:
 
LAC_DERBY_SERVER_PORT=1527
Set the network on which to start API Server
 
LAC_DERBY_SERVER_HOST
 
This option is only for advanced users. Add this option only if you are performing advanced troubleshooting and require access to the in-memory Derby database from a database client tool. 
If you have added the option to access the in-memory Derby database (the 
LAC_DERBY_SERVER_PORT
 option), you must also add this option.
 
Default:
 
localhost
 
 
Example:
 
LAC_DERBY_SERVER_HOST=localhost
Enable JavaScript optimization
LAC_ENABLE_NASHORN_OPT_TYPES
In JDK 9 or later, the Nashorn JavaScript engine attempts to optimize its compilation of JavaScript code. This optimization is expensive at first, which means that the first minute or two of execution can be sluggish. By default, 
CA Live API Creator
 turns off this option in JDK 9 and later. In this case, you might not get all the possible performance. If you do not mind your service being a bit slow to rev up, you can turn on this option, which might give you some extra performance after the compilation is done.
 
Default
false
 
 
Example:
 
LAC_ENABLE_NASHORN_OPT_TYPES=true