LightWave Client
1.4.1 1.4.0 1.3.1 1.2.9 1.2.8 1.2.7 1.2.6 1.2.5 1.2.4
1.4.1 1.4.0 1.3.1 1.2.9 1.2.8 1.2.7 1.2.6 1.2.5 1.2.4

Listing, Exporting and Importing APIs

This subsection describes using LWCCOM to list, export and import LWC APIs. This can be useful when APIs need to be copied from one filesystem to another.

Listing APIs

The LWCCOM INFO command is used to retrieve information about the APIs in a filesystem. This can be done for both the source and target filesystems.

LWCCOM 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:

LWCCOM 4-> info api *
Name                                                              Description
----------------------------------------------------------------  -----------------------------------------------------------------
com.example.demo.api                                              A hypothetical demo API.

--- 1 APIs
LWCCOM 6-> info api com.example.demo, detail
Name..................... com.example.demo.api
Description.............. A hypothetical demo API.
Modified................. 2026-11-05T17:33:33Z

Exporting APIs

The syntax for the LWCCOM EXPORT API command is:

LWCCOM 2-> help export api
 
EXPORT API Command
 
Exports an API from the fileystem into a file
 
  EXPORT API <api-name>
         , FILE <file-name> [ ! ]
         [ , FORMAT { NATIVE | DDL } ]
 
<api-name>
 
  The name of the API.
 
FILE <file-name> [ ! ]
 
  File to receive exported API definition.
 
FORMAT { NATIVE | DDL }
 
  Export format: native API or DDL source. If omitted, NATIVE is assumed.

When the intention is to import the API to another LWC filesystem, use the NATIVE parameter if using the FORMAT option. (The FORMAT DDL option is useful when generating source language structures for the API.)

For example:

LWCCOM 7-> export api com.example.demo.api, file myapi !, format native
API com.example.demo.api exported to $DATA.LWCEXPO.MYAPI

The MYAPI file can then be used for a LWCCOM IMPORT command.

Importing APIs

The syntax for the LWCCOM IMPORT API command is:

LWCCOM 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 by that name.

For example:

LWCCOM 9-> import api * !, file $data.lwcexpo.myapi
API com.example.demo.api imported