Getting started with the Portal CLI commands
The toolkit CLI provides developer portal-specific commands for managing your portal servers and sites.
Procedure
- Install the toolkit: Setting up the API Connect toolkit
- Log in to the Management server. . For example:
Whereapic login --server <platform-api-host-name> --sso
<platform-api-host-name>
is the hostname portion URL of the server that hosts the API Manager (the "management server"). To determine the hostname, open API Manager in a browser, and copy the hostname from the URL in the address bar (beginning after "https://" and ending before "/manager") as shown in the following example:
When the toolkit prompts for the context, typehttps://platform-api.us-east-1.d-r01.apic.cloud.ibm.com/manager
provider
and press Enter:
For more information about the toolkit CLI, see Setting up the API Connect toolkit.Context? provider
- View the available toolkit portal commands by using
-m portaladmin -h
. Example:apic -m portaladmin -h ...Usage: apic [flags] apic [command] Available Flags: --accept-license Accept the license for API Connect --debug Enable debug output --debug-output string Write debug output to file -h, --help Help for apic --live-help Enable or disable tracking of limited usage information -m, --mode string Toolkit operation mode (default "apim") Available Commands: Creating applications and artifacts config Manage configuration variables Publishing to the cloud api Api operations apic-config Apic Config operations application Application operations backups Backups operations consumer-org Consumer Org operations custom-module Custom Module operations custom-theme Custom Theme operations custom-translation Custom Translation operations custom-webserver-page Custom Webserver Page operations drupal-config Drupal Config operations drupal-state Drupal State operations entity Entity operations factory-reset Factory Reset operations ip-security-enabled Ip Security Enabled operations modules Modules operations php-memory Php Memory operations platforms Platforms operations product Product operations security Security operations service-ip-allowlist Service Ip Allowlist operations site Site operations site-config Site Config operations sites Sites operations themes Themes operations twig Twig operations Other commands licenses Review the license for API Connect validate Validate an API or product definition version Get the APIConnect toolkit version Additional help topics: Use "apic [command] --help" for more information about a command.
- To view command-specific help, run the command with
-h
:apic -m portaladmin php-memory -h Usage: apic php-memory:list [flags] Php Memory operations Flags: --format string Output format. One of [json yaml go-template=... go-template-file=...], defaults to yaml. -h, --help Help for list --portal_service_name string The name of the portal service (required) -s, --server string management server endpoint (required) Type "apic [command] --help" for help on the following related commands: php-memory:list List the PHP memory limit on the platform. php-memory:update Set the PHP memory limit on the portal platform.
apic -m portaladmin php-memory:list -h Usage: apic php-memory:list [flags] List the PHP memory limit on the platform. Lists the PHP memory_limit setting on the portal platform. Flags: --format string Output format. One of [json yaml go-template=... go-template-file=...], defaults to yaml. --portal_service_name string The name of the portal service (required) -s, --server string management server endpoint (required)