API Server Startup Options

You can add server-level options, either as environment variables or as Java system properties to the Java command line for your server, when you start API Server.
lac52
You can add server-level options, either as environment variables or as Java system properties to the Java command line for your server, when you start API Server. For example, you can install the API Server license by adding the
LAC_DEFAULT_LICENSE_FILE
option when you start API Server.
These options override API-level settings.
For more information about API-level settings, see API Properties.
In this article:
Install the API Server License
Use this option only if you are licensed to use
Layer7 Live API Creator
under a standard license that the CA Support site issues. For more information about licensing, see Licensing.
You can install the API Service license by adding the following option when you start API Server:
LAC_DEFAULT_LICENSE_FILE
Set the value for this option as the complete path to a valid license file.
Example:
The following example sets the path to the
LACLicense.txt
license file and installs the API Server license:
-DLAC_DEFAULT_LICENSE_FILE=/Users/jdoe/LACLicense.txt
Best Practice:
After
Layer7 Live API Creator
has started the first time, 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
You can set the initial password for the system administrator (
sa
) user by adding the following option when you start API Server:
LAC_INITIAL_SA_PASSWORD
Example:
The following example sets the password for the system administrator (
sa
) user to
MySAPassword
:
-DLAC_INITIAL_SA_PASSWORD=MySAPassword
Best Practice:
After you have set the initial password for the system administrator (
sa
) user and
Layer7 Live API Creator
has started the first time, remove this environment variable.
Set the Password for the Initial API Developer
You can set the password for the initial API developer (a TeamSpace user) for the
default
TeamSpace by adding the following option when you start API Server:
LAC_INITIAL_ADMIN_PASSWORD
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.
Prerequisite:
Your admin repository is empty. API Server initializes your admin repository when you start API Server the first time.
Example:
The following example sets the password for the initial API developer user to
MyAdminPassword
:
-DLAC_INITIAL_ADMIN_PASSWORD=MyAdminPassword
Set the URL Fragment for the Default TeamSpace
You can set the URL fragment for the
default
TeamSpace by adding the following option when you start API Server:
LAC_INITIAL_ACCOUNT_URL_NAME
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.
Prerequisite:
Your admin repository is empty. API Server initializes your admin repository when you start API Server the first time.
Example:
The following example sets the URL fragment for the
default
TeamSpace to
MyTeamSpaceURLFragment
:
-DLAC_INITIAL_ACCOUNT_URL_NAME=MyTeamSpaceURLFragment
Set the Name for the Default TeamSpace
You can set the name for the
default
TeamSpace by adding the following option when you start API Server:
LAC_INITIAL_ACCOUNT_NAME
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.
Prerequisite:
Your admin repository is empty. API Server initializes your admin repository when you start API Server the first time.
Example:
The following example sets the name for the
default
TeamSpace to
MyTeamSpaceName
:
-DLAC_INITIAL_ACCOUNT_NAME=MyTeamSpaceName
Pre-accept the End-User License Agreement
You can bypass the API Creator screen that asks the initial API developer to log in to accept the user license, and pre-accept the end-user license agreement (EULA) by adding the following option when you start API Server:
CA_ACCEPT_LICENSE
Example:
The following example accepts the EULA for the English language (
ENU
):
-DCA_ACCEPT_LICENSE=ENU
For historical reasons, you can use the lowercase form of this option,
ca_accept_license
. For forward compatibility, use uppercase.
Telemetry Options
You can activate
Layer7 Live API Creator
and configure it to collect and send telemetry data, or usage data, by adding the following options when you start API Server:
Set Your License Type for API Server
You can license to use
Layer7 Live API Creator
under an Enterprise Software Portfolio License Agreement (PLA) or under a standard license that the CA Support site issues. You can set your API Server license type by adding the following option when you start API Server:
LAC_TELEMETRY_PLA_ENABLED
Values:
  • true
    : You are licensed to use
    Layer7 Live API Creator
    under a PLA.
    If you set this option to
    true
    , you must also add the following options when you start API Server:
    • LAC_TELEMETRY_SEND_ENABLED
      If you are a licensed to use
      Layer7 Live API Creator
      under a PLA, you must set this option to
      true
      .
    • LAC_TELEMETRY_SITE_ID
    • LAC_TELEMETRY_DOMAIN_NAME
  • false
    : You are licensed to use
    Layer7 Live API Creator
    under a standard license.
Default value:
false
Example:
The following example sets your API Server license type as licensed to use
Layer7 Live API Creator
under a PLA:
-DLAC_TELEMETRY_PLA_ENABLED=true
Consent to Send Usage Data
If you are licensed to use
Layer7 Live API Creator
under a standard license, you can consent to
Layer7 Live API Creator
collecting and sending usage data. If you are licensed to use
Layer7 Live API Creator
under a PLA, you must consent to it collecting and sending usage data (set the following option to
true
).
You can consent to send usage data by adding the following option when you start API Server:
LAC_TELEMETRY_SEND_ENABLED
Values:
  • true
    : You have consented to
    Layer7 Live API Creator
    collecting and sending usage data.
    If you have added the option to set your API Server license type as licensed to use
    Layer7 Live API Creator
    under a PLA (the
    LAC_TELEMETRY_PLA_ENABLED
    option) and set it to
    true
    , you must also add this option when you start API Server and set it to
    true
    .
  • false
    : You have not consented to
    Layer7 Live API Creator
    collecting and sending usage data.
Default value:
true
Example:
The following example sets your API Server license type as consenting to
Layer7 Live API Creator
collecting and sending usage data:
-DLAC_TELEMETRY_SEND_ENABLED=true
For more information about the methods of updating your usage data configuration, including adding this option at API Server startup, see Activate and Configure to Send Usage Data.
Set the Domain Name
You can set the domain name for usage data by adding the following option when you start API Server:
LAC_TELEMETRY_DOMAIN_NAME
If you have added the option to set your API Server license type as licensed to use
Layer7 Live API Creator
under a PLA (the
LAC_TELEMETRY_PLA_ENABLED
option is set to
true
), you must also add this option.
Example:
The following example sets the domain name to mycompany.com:
-DLAC_TELEMETRY_DOMAIN_NAME=mycompany.com
Set the Enterprise Site ID
You can set the enterprise site ID that CA Support assigns to your company by adding the following option when you start API Server:
LAC_TELEMETRY_SITE_ID
You can view your site ID when you log in to the CA Support site.
If you have added the option to set your API Server license type as licensed to use
Layer7 Live API Creator
under a PLA (the
LAC_TELEMETRY_PLA_ENABLED
option is set to
true
), you must also add this option.
Example:
The following example sets the enterprise site ID to
abc123
:
-DLAC_TELEMETRY_SITE_ID=abc123
Set the Chargeback ID
You can set the department or cost center that you use for internal tracking by adding the following option when you start API Server:
LAC_TELEMETRY_CHARGEBACK_ID
Example:
The following example sets the chargeback ID to
Accounting - CANADA
:
If the value includes special characters or spaces, enclose the value in double quotes ("), for example "Accounting - CANADA".
-DLAC_TELEMETRY_CHARGEBACK_ID="Accounting - CANADA"
Options for Proxy Server (for Telemetry)
If you want to add options at API Server startup to set proxy server options, such as the URL or port, you must add all of the proxy server options.
Set the Proxy Server
You can set the URL for the proxy server that you use to send usage data by adding the following option when you start API Server:
LAC_TELEMETRY_PROXY_URL
If you add this option, you must also also add the following options when you start API Server:
  • LAC_TELEMETRY_PROXY_PORT
  • LAC_TELEMETRY_PROXY_USERNAME
  • LAC_TELEMETRY_PROXY_PASSWORD
Example:
The following example sets the URL for the proxy server to
http://localhost
:
-DLAC_TELEMETRY_PROXY_URL=http://proxy.mycompany.com
Set the Proxy Server Port
You can set the port for the proxy server by adding the following option when you start API Server:
LAC_TELEMETRY_PROXY_PORT
If you have added the option to set the URL for the proxy server (the
LAC_TELEMETRY_PROXY_URL
option), you must also add this option.
Example:
The following example sets the port for the proxy server to
8080
:
-DLAC_TELEMETRY_PROXY_PORT=8080
Set the Proxy Server Username
You can set the username for the proxy server by adding the following option when you start API Server:
LAC_TELEMETRY_PROXY_USERNAME
If you have added the option to set the URL for the proxy server (the
LAC_TELEMETRY_PROXY_URL
option), you must also add this option.
Example:
The following example sets the username for the proxy server to
jdoe
:
-DLAC_TELEMETRY_PROXY_USERNAME=jdoe
Set the Proxy Server Password
You can set the password for the proxy server by adding the following option when you start API Server:
LAC_TELEMETRY_PROXY_PASSWORD
If you have added the option to set the URL for the proxy server (the
LAC_TELEMETRY_PROXY_URL
option), you must also add this option.
Example:
The following example sets the password for the proxy server to
Password1
:
-DLAC_TELEMETRY_PROXY_PASSWORD=Password1
Set the Unique Identifier for a Server Instance
You can set the unique identifier (ID) for a server instance by adding the following option when you start API Server:
LAC_SERVER_IDENT
In a cluster, each server has a unique ID, which is by default a UUID. This unique ID is the server ident. For example, you can name your server instances by adding this option when starting API Server. Enter a unique name for each server in the cluster.
Example:
The following example sets the server name to
Server42
:
-DLAC_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
You can set the absolute path of the logging configuration file by adding the following option when you start API Server:
LAC_LOGGING_CONFIG_FILE
Example:
The following example sets the absolute path to
/<path_to_your_logging_configuration_file>/<configuration_file_name>
:
-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
By default, API Server does not require log encoding. You can prevent log injection by setting API Server to require log encoding. Prevent log injection by adding the following option when you start API Server:
LAC_LOG_ENCODING_REQUIRED
Values:
  • true
    : API Server requires log encoding.
  • false
    : API Server does not require log encoding.
Default value:
false
Example:
The following example sets API Server to require log encoding and, therefore, prevent log injection:
-DLAC_LOG_ENCODING_REQUIRED=true
Set the Location of your Admin Repository
You can set the location of your admin repository by adding the following option when you start API Server:
LAC_REPOSITORY_ROOT
Set the value for this option as the complete path to your admin repository.
Default value:
~
/CALIveAPICreator.repository
Example:
The following example sets the location for your admin repository:
-DLAC_REPOSITORY_ROOT=${HOME}/CALiveAPICreator.repository
For more information about the admin repository, see View your API Definition.
Set the Location From Which
Layer7 Live API Creator
Pulls your Admin Repository
By default, when you first start API Server,
Layer7 Live API Creator
pulls your admin repository from the location that you set using the
LAC_REPOSITORY_ROOT
option. You can set or change this location (URL or Git) from which
Layer7 Live API Creator
pulls your admin repository by adding the following option when you start API Server:
LAC_REPOSITORY_CONFIGURATION_URL
Set the value for this option as the complete path to the location.
Default value:
~
/CALIveAPICreator.repository
Example:
The following example sets the location to
https://s3-us-west-1.amazonaws.com/mybucket/myRepository.zip
:
-DLAC_REPOSITORY_CONFIGURATION_URL= https://s3-us-west-1.amazonaws.com/mybucket/myRepository.zip
For more information about the admin repository, see View your API Definition.
Set API Server to Back Up What is in Memory
Each time a TeamSpace user changes API metadata, API Server saves a backup of the changes to your API definitions to the
backups/timeline
directory. By default, API Server does not back up what is in memory. If you have set API Server to back up what is in memory, it retains these backups for ten days of development activities. You can have API Server back up what is in memory by adding the following option when you start API Server:
LAC_REPOSITORY_BACKUP
Values:
  • true
    : API Server backs up what is in memory.
  • false
    : API Server does not back up what is in memory.
Default value:
false
Example:
The following example sets API Server to back up what is in memory when you start your server:
-DLAC_REPOSITORY_BACKUP=true
Layer7 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.
For more information about this directory in the admin repository, see View your API Definition.
Set the Number of Days API Server Retains Backups
By default, API Server retains a backup of what is in memory for ten days. You can set 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 by adding the following option when you start API Server:
LAC_REPOSITORY_BACKUP_DAYS_TO_KEEP
Default value:
10
Example:
The following example sets API Server to retain the backup that is in memory for 30 days:
-DLAC_REPOSITORY_BACKUP_DAYS_TO_KEEP=30
Set API Server to Write to Disk The Changes That you Make to the Admin Repository
By default, API Server does not write to disk the changes that you make to the admin repository. In production environments, you can prevent API Server from writing to disk the changes that you make to the admin repository by adding the following option when you start API Server:
LAC_REPOSITORY_DISABLE
Setting the value for this option directs API Server to 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:
The following example sets API Server to write to disk the changes that you make to the admin repository:
-DLAC_REPOSITORY_DISABLE=true
Access the In-Memory Derby Database
This option is only for advanced users. Add this option only if you are performing advanced troubleshooting and you require access to the in-memory Derby database from a database client tool.
By default, API users cannot access the in-memory Derby database. You can set the port number on which API users access the database by adding the following option when you start API Server:
LAC_DERBY_SERVER_PORT
Set the value for this option as the port number on which you access the database. 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).
Example:
The following example sets the value for the port number on which API users access the database to
1527
:
-DLAC_DERBY_SERVER_PORT=1527
Then API users can access the database using the following URL:
jdbc:derby://localhost:1527/memory:AdminDB
A username and password are required to access the in-memory Derby database. Any username and password combination works.
Set the Network on Which to Start API Server
This option is only for advanced users. Add this option only if you are performing advanced troubleshooting and you require access to the in-memory Derby database from a database client tool.
You can set the network on which API users access the database by adding the following option when you start API Server:
LAC_DERBY_SERVER_HOST
Set the value for this option as the port number on which you access the database. 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:
The following example sets the value for the network to
localhost
:
-DLAC_DERBY_SERVER_HOST=localhost
Set API Server to Optimize JavaScript
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, API Server does not optimize JavaScript 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 set API Server to optimize JavaScript. This can give you some extra performance after it completes compilation.
You can set API Server to optimize JavaScript by adding the following option when you start API Server:
LAC_ENABLE_NASHORN_OPT_TYPES
Values:
  • true
    : API Server optimizes JavaScript.
  • false
    : API Server does not optimize JavaScript.
Default
:
false
Example:
The following example sets API Server to optimize JavaScript:
-DLAC_ENABLE_NASHORN_OPT_TYPES=true
Optimize API Performance by Turning Off In-Memory Logging
By default,
Layer7 Live API Creator
keeps a log of the latest requests in memory. You can optimize performance by turning off in-memory logging.
You can turn it off at the API Server level or at the API level. To turn off in-memory logging at the API Server, add the following option and set it to
false
when you start API Server. To turn off in-memory logging at the API level, clear the
Enable In-Memory Logs
checkbox that is on the
Settings
tab for your API.
For more information about this setting, see API Properties.
Best Practice:
Turn off in-memory logging at the API Server level, especially in test and production environments, and then configure external logging.
For more information:
You can turn off in-memory logging at the API Server level by adding the following option when you start API Server:
LAC_USE_IN_MEMORY_LOGGING
Values:
  • true
    :
    Layer7 Live API Creator
    determines whether to keep a log of the latest requests in memory based on the API level setting for displaying in-memory logs (the
    Enable In-Memory Logs
    checkbox that is on the Settings tab).
  • false
    :
    Layer7 Live API Creator
    does not keep a log of recent requests in memory (in-memory logging is turned off at the API Server level). The Logs page in API Creator does not show logs.
Default
:
true
Example
:
The following example turns off in-memory logging:
-DLAC_USE_IN_MEMORY_LOGGING=false
Disable API Server from Running Timers
By default, API Server runs the background thread for the timer scheduler. You can disable API Server from running this background thread by adding the following option when you start API Server:
LAC_SCHEDULING_DISABLE=false
In production environments, consider optimizing performance by setting this option to
true
.
Values:
  • true
    : API Server does not run the background thread for the timer scheduler. If your APIs do not require or use timers, set the option to
    true
    .
  • false
    : API Server runs the background thread for the timer scheduler.
Default
:
false
Example:
The following example disables API Server from running the background thread for the timer scheduler:
-DLAC_SCHEDULING_DISABLE=true