Getting started with the Portal CLI commands

The toolkit CLI provides developer portal-specific commands for managing your portal servers and sites.

Procedure

  1. Install the toolkit: Setting up the API Connect toolkit
  2. Log in to the Management server: Toolkit CLI Login.
    apic login --server <management hostname/api base url> --username <username> --realm <realm>
    Where:
    • <management hostname/api base url> is the FQDN or base URL of your management API endpoints, for example: mgmt.example.com or https://mgmt.example.com.
    • <username> is either the admin user or provider org owner, depending on whether you want to run cloud or provider organization scoped operations.
    • <realm> is the user registry realm for the specified <username>. By default this is admin/default-idp-1 for the admin user, and provider/default-idp-2 for provider organization users.
    Note: All portal CLI commands are either cloud admin or provider org scoped.
  3. 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.
    
  4. 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)