This subsection describes using LWSCOM to list, export and import LWS APIs. This can be useful when the Console is not available, and APIs must be copied from one filesystem to another, such as during a migration from QA to production.
LightWave Server APIs contain references to LightWave Server Dictionaries. When performing exports/imports of APIs, be sure to perform exports of referenced Dictionaries.
Listing APIs
The LWSCOM INFO command is used to retrieve information about the APIs in a filesystem. This can be done for both the source and target filesystems.
LWSCOM 3-> help info api
INFO API Command
Displays information about APIs in the filesystem
INFO API { <api-name> | * }
[ , DETAIL ]
{ <api-name> | * }
The name of the API, or '*' for all APIs.
DETAIL
Causes detailed information to be displayed. The use of this parameter is
object-specific.
For example:
LWSCOM 4-> info api *
Name Description
---------------------------------------------------------------- -----------------------------------------------------------------
com.example.demo.api A hypothetical demo API.
--- 1 APIs
LWSCOM 6-> info api com.nuwavetech.demo, detail
Name..................... com.example.demo.api
Description.............. A hypothetical demo API.
Modified................. 2026-11-05T17:33:33Z
Exporting APIs
The syntax for the LWSCOM EXPORT API command is:
LWSCOM 2-> help export api
EXPORT API Command
Exports an API from the fileystem into a file
EXPORT API <api-name>
, FILE <file-name> [ ! ]
<api-name>
The name of the API.
FILE <file-name> [ ! ]
File to receive exported API definition.
For example:
LWSCOM 7-> export api com.example.demo.api, file myapi !
API com.example.demo.api exported to $DATA.LWSEXPO.MYAPI
The MYAPI file can then be used for a LWSCOM IMPORT command.
Importing APIs
The syntax for the LWSCOM IMPORT API command is:
LWSCOM 8-> help import api
IMPORT API Command
Imports an API into the filesystem from a file
IMPORT API { <api-name> | * } [ ! ]
, FILE <file-name>
{ <api-name> | * } [ ! ]
The name to be used for the imported API, or '*' to use the API name
contained in the file being imported.
FILE <file-name>
File containing the API definition to be imported.
When importing an API, you can use the name stored in the API file (i.e., specify “*” for the intended API name) or you can give it a different name. Specify the exclamation point to replace an existing API with that name.
For example:
LWSCOM 9-> import api * !, file $data.lwsexpo.myapi
API com.example.demo.api imported