Import Command
Use the import command to apply API asset packages to a target environment.
On this page:
Overview
The import command applies the exported configurations to a target environment that can be used to:
- Promote assets from a source environment to a target environment
- Set up a new Akana environment by using configurations stored in the repository
Before you begin:
- Prepare the environment configuration file required for importing assets.
- Create an import-config.yaml file that specifies the assets to import and the import strategy to apply.
For more information, see Import configuration.
Syntax
The following is the syntax for the import command:
Linux:
./api-ops.sh command=import \
baseConfigFolder=<path_to_config_folder> \
environmentConfig=<environment_config_file> \
commandConfig=<import_config_file> \
encryptionKeystorePath=<path_to_encryption_keystore>
Windows:
api-ops.bat command=import
baseConfigFolder=<path_to_config_folder>
environmentConfig=<environment_config_file>
commandConfig=<import_config_file>
encryptionKeystorePath=<path_to_encryption_keystore>
The following table shows the parameter description:
| Parameter | Required | Description |
|---|---|---|
| command | Yes | Specifies the operation to run (import). |
| baseConfigFolder | Yes | Specifies the path to the API Ops CLI configuration directory that contains the base configuration files used during the import operation. |
| environmentConfig | Yes | Specifies the environment configuration file that defines environment‑specific settings for the import operation. |
| commandConfig | Yes | Specifies the import configuration file that defines the parameters used during the import operation. |
| encryptionKeystorePath | Optional | Specifies the path to the encryption keystore file that stores the encryption keys used during the import operation. |
Example:
Execute the import command from the /bin directory:
Linux:
./api-ops.sh command=import baseConfigFolder=/Users/apiops.user/Temp/api-ops-2026.1.0/config environmentConfig=environment-config.yaml commandConfig=import-config.yaml encryptionKeystorePath=/Users/apiops.user/Temp/api-ops-2026.1.0/keystore/encryption-keystore.p12
Windows:
api-ops.bat command=import baseConfigFolder=C:/Users/apiops.user/Temp/api-ops-2026.1.0/config environmentConfig=environment-config.yaml commandConfig=import-config.yaml encryptionKeystorePath=C:/Users/apiops.user/Temp/api-ops-2026.1.0/keystore/encryption-keystore.p12
Result:
After you run the import command, verify that the assets are imported successfully.
- Validate the response.Copy
APIs successfully imported:
- "Payment_Initiation_API" - Validate the logs/promotion.log for asset import status.
- Verify in the target environment user interface that the related assets such as, documentation, avatars, contracts, OAuth scopes, deployment zones, license, and API documentation appear correctly.
Error logging
During an import operation, errors are handled and recorded at the asset level.
For each import run, the import logs include:
- A list of assets that were imported successfully
- A list of assets that failed to import
A failure related to one asset does not automatically stop the import of other assets. The import continues processing remaining assets where possible, and all failures are recorded in the logs.
To troubleshoot export or import errors, enable DEBUG logging before you run the operation. DEBUG logs provide additional diagnostic details that help identify the root cause of failures.