Developer Portal CLI commands

A summary of the commands that are supported in the Developer Portal CLI.

Authenticating

Use the apic login command to authenticate, and the apic logout command to remove your local authentication credentials. For more information, see Getting started with the Portal CLI commands.

Note: When you authenticate successfully, your credentials are stored, in plain text, in the file [Icon indicating that this applies on Linux platforms].netrc or [Icon indicating that this applies on Windows platforms]_netrc. Therefore, you must set the file permissions in such a way that your credentials are not accessible by others.

Command summary

The following tables summarize apic --mode portaladmin commands.

Table 1. Summary of the portaladmin commands
Command Description Subcommands
apic api Manage your api.
  • apic api:add-attachment - Add an attachment for an API
  • apic api:add-tag - Add a tag for an API.
  • apic api:get - Get an API from a portal service.
  • apic api:get-document - Get a specific entire API document from the portal of the given organization and catalog.
  • apic api:list - List the APIs of the given organization and catalog.
  • apic api:set-icon - Set an icon for an API.

For more information, see Using the api commands.

apic apic-config Manage your apic-config.
  • apic apic-config:get - Get the configuration of a site.

For more information, see Using the apic-config commands.

apic application Manage your application.
  • apic application:get - Get an application from a portal service.
  • apic application:list - List the applications on a portal service.

For more information, see Using the application commands.

apic backups Manage your backups.
  • apic backups:list - List the backups of a portal service.

For more information, see Using the backups commands.

apic consumer-org Manage your apic consumer-org.
  • apic consumer-org:get - Get a consumer org from a portal service.
  • apic consumer-org:list - List the consumer orgs on a portal service.

For more information, see Using the consumer-org commands.

apic content Manage your content entity types.
  • content:create-export - Create a task to export a .tgz file containing your site content entities.
  • content:create-import - Create a task to import an archive of your site content.
  • content:delete-export - Cancel any currently running content:create-export tasks, and delete any related artifacts.
  • content:delete-import - Cancel any currently running content:create-import tasks, and delete any related artifacts.
  • content:get-export-status - Return the status of a specific export task.
  • content:get-export - Stream the content of a specific export task to a .tgz file.
  • content:get-import-status - Return the status of a specific import task.
  • apic content:list - List all of the entities in your site for a given content entity type and, if required, bundle.
  • apic content:list-type - List the content entity types that are exportable from your site.

For more information, see Using the content commands.

apic custom-module Manage your custom modules.
  • apic custom-module:create-export - Create an export of a custom module.
  • apic custom-module:create-import - Create an import of a custom module.
  • apic custom-module:delete-export - Delete an export of a custom module.
  • apic custom-module:delete-import - Delete an import of a custom module.
  • apic custom-module:get-export - Get an export of a custom module.
  • apic custom-module:get-export-status - Get the status of an export of a custom module.
  • apic custom-module:get-import-status - Get the status of an import of a custom module.

For more information, see Using the custom-module commands.

apic custom-theme Manage your custom themes.
  • apic custom-theme:create-export - Create an export of a custom theme.
  • apic custom-theme:create-import - Create an import of a custom theme.
  • apic custom-theme:delete-export - Delete an export of a custom theme.
  • apic custom-theme:delete-import - Delete an import of a custom theme.
  • apic custom-theme:get-export - Get an export of a custom theme.
  • apic custom-theme:get-export-status - Get the status of an export of a custom theme.
  • apic custom-theme:get-import-status - Get the status of an import of a custom theme.

For more information, see Using the custom-theme commands.

apic custom-translation Manage your custom translations.
  • apic custom-translation:create-export - Create a task to export a custom translation.
  • apic custom-translation:create-import - Create a task to import a custom translation.
  • apic custom-translation:delete-export - Cancel any ongoing or recently created export tasks.
  • apic custom-translation:delete-import - Cancel any ongoing or recently created import tasks.
  • apic custom-translation:get-export - Streams an export artifact of a custom translation back to the provided task ID.
  • apic custom-translation:get-export-status - Get the status of an export of a custom translation.
  • apic custom-translation:get-import-status - Get the status of an import of a custom translation.

For more information, see Using the custom-translation commands.

apic custom-webserver-page Manage your custom-webserver-page content.
  • apic custom-webserver-page:delete - Delete a custom HTML web server error page.
  • apic custom-webserver-page:get - Get the content of a custom HTML web server error page.
  • apic custom-webserver-page:set - Set a custom HTML web server error page by using a valid HTML5 content file.

For more information, see Using the custom-webserver-page commands.

apic drupal-config Manage your drupal-config.
  • apic drupal-config:delete - Delete a Drupal config object, or a specific config key.
  • apic drupal-config:get - Get all of the key values for a Drupal config object, or a specific config key value.
  • apic drupal-config:list - List the Drupal config names by prefix, or list all.
  • apic drupal-config:set - Set a new Drupal config key and value, or update an existing config key and value.

For more information, see Using the drupal-config commands.

apic drupal-state Manage your drupal-state keys and values.
  • apic drupal-state:delete - Delete a specific Drupal state key and value.
  • apic drupal-state:get - Get a specific Drupal state key value.
  • apic drupal-state:set - Set a new Drupal state key and value, or update an existing state key value.

For more information, see Using the drupal-state commands.

apic entity Manage your entity.
  • apic entity:count - A count of entities from a site.

For more information, see Using the entity commands.

apic export-entity Manage the export of your content entities.
  • export-entity:create - Create a new export entity, which is the container for the entity content that you want to export.
  • export-entity:add-content - Adds content to an existing export entity.
  • export-entity:get - Returns a list of the content of a specific export entity.
  • export-entity:remove-content - Removes certain content from a specific export entity.
  • export-entity:delete - Deletes a specific export entity.
  • export-entity:launch - Launches an export entity polling task that creates a .tgz file of all of the entities that are contained in a specific export entity. Can be run with a --no-poll option, in which case the task doesn't return a .tgz file, but just returns the task ID.
  • export-entity:get-launch-export - Streams the content of a specific completed export-entity:launch task to a .tgz file.
  • export-entity:delete-launch-export - Cancels a currently running export-entity:launch task, and deletes any related artifacts.
  • export-entity:get-launch-export-status - Returns the status of a specific export-entity:launch task.
  • export-entity:list - Returns a list of all of the export entities within a specific Developer Portal. Each export entity contains a defined list of all of the entity content that will be exported if export-entity:launch is run.

For more information, see Using the export-entity commands.

apic factory-reset Perform a factory reset of your Developer Portal.
  • apic factory-reset:delete - Perform a factory reset of your Developer Portal, deleting the portal service and all of its associated Developer Portal sites.
Warning: The factory-reset command is irreversible. You must ensure that you have backups created before running this command.

For more information, see Using the factory-reset command.

apic forums Manage your forums.
  • apic forums:disable - disables the Forum module for a given site.
  • apic forums:enable - enables the Forum module for a given site.

For more information, see Using the forums commands.

apic ip-security-enabled Manage your IP security.
  • apic ip-security-enabled:update - Enable or disable the IP security at the portal service level.

For more information, see Using the ip-security-enabled command.

apic maintenance Manage your maintenance operations.
  • apic maintenance:disable - Disable your maintenance operations.
  • apic maintenance:enable - Enable your maintenance operations.
  • apic maintenance:rebuild_node_access - Rebuild the node access table of your maintenance operations.
  • apic maintenance:search_api_index_rebuild - Rebuild and re-index the search API index of your maintenance operations.
  • apic maintenance:search_api_index_status - Print the search API index status of your maintenance operations.
  • apic maintenance:status - Get the current mode of your maintenance operations.

For more information, see Using the maintenance commands.

apic memcache Manage your memcache operations.
  • apic memcache:disable - Disable the default caching store operations. This sets Drupal to use database as its cache.
  • apic memcache:enable - Enable the default caching store operations. This sets Drupal to use RAM as its cache.
  • apic memcache:get - Get the status of the memcache enabled operations.

For more information, see Using the memcache commands.

apic modules Manage your modules.
  • apic modules:delete - Delete modules.
  • apic modules:disable - Disable modules.
  • apic modules:enable - Enable modules.
  • apic modules:list - Get a list of your modules.

For more information, see Using the modules commands.

apic php-memory Manage your php-memory.
  • apic php-memory:list - List the PHP memory limit on the platform.
  • apic php-memory:update - Set the PHP memory limit on the portal platform.

For more information, see Using the php-memory commands.

apic platforms Manage your platforms.
  • apic platforms:list - List the platforms of a portal service.

For more information, see Using the platforms commands.

apic product Manage your product.
  • apic product:add-attachment - Add an attachment for the given product.
  • apic product:add-tag - Add a tag for the given product.
  • apic product:get - Get a product from a portal service.
  • apic product:get-document - Get a specific entire product document from the portal of the given organization and catalog.
  • apic product:list - List the products on a portal service.
  • apic product:set-icon - Set an icon image for the given product.

For more information, see Using the product commands.

apic queue View the tasks in a portal queue.
  • apic queue:get - View the queued and locked platform related tasks for a specific Developer Portal site.
  • apic queue:list - View the queued and locked platform related tasks across all of the Developer Portal sites on a specific portal service.

For more information, see Using the queue commands.

apic role Manage your role operations.
  • apic role:create - Create a new Drupal user role.
  • apic role:delete - Delete an unwanted Drupal user role.
  • apic role:add-permission - Add specific permissions to a Drupal user role.
  • apic role:remove-permission - Remove unwanted permissions from a Drupal user role.
  • apic role:get - Get the details of a Drupal user role as well as all the permissions granted to the specific role.
  • apic role:list - List all of the roles. You can filter the list based on the user role as well as the permission using the corresponding flags along with the role:list command. Use the --filter_by_permission flag to get the list of the roles that have the specified permission. Use the --role flag to get the list of permissions granted to the specified role.

For more information, see Using the role commands.

apic security Manage your security.
  • apic security:clear-bans - Clear all of the banned user/IP addresses on a portal site.

For more information, see Using the security command.

apic service Manage your service operations.
  • apic service:list - List the Portal service currently installed.

For more information, see Using the service command.

apic service-ip-allowlist Manage your service-ip-allowlist, which enables specific IP addresses to be exempt from being blocked by portal security checks.
  • apic service-ip-allowlist:add - Add specific IP addresses to the allowlist.
  • apic service-ip-allowlist:delete - Delete all of the IP addresses from the allowlist.
  • apic service-ip-allowlist:list - List all of the IP addresses that are currently on the allowlist.
  • apic service-ip-allowlist:remove - Remove one or more specific IP addresses from the allowlist.

For more information, see Using the service-ip-allowlist commands.

apic site Manage your site.
  • site:cache-rebuild - Rebuild the cache of a portal site.
  • apic site:check - Run a platform check against a portal site.
  • apic site:state - Obtain the current state of a portal site.
  • apic site:login-link - Get an admin login link for a specific portal site.
  • site:create-export - Create a task to export a .tgz archive file of your entire site configuration.
  • site:create-import - Create a task to import an archive of your entire site configuration.
  • site:delete-export - Cancel any currently running site:create-export tasks, and delete any related artifacts.
  • site:delete-import - Cancel any currently running site:create-import tasks, and delete any related artifacts.
  • site:get-export-status - Return the status of a specific export task.
  • site:get-export - Stream the content of a specific completed export task to a .tgz file.
  • site:get-import-status - Return the status of a specific import task.
Important: If you want to import a site export configuration file, the export file must have been created on the same version of API Connect as the version that you want to import to.

For more information, see Using the site commands.

apic site-config Manage your site-config.
  • apic site-config:create-export - Create an export of a site config.
  • apic site-config:create-import - Create an import of a site config.
  • apic site-config:delete-export - Delete an export of a site config.
  • apic site-config:delete-import - Delete an import of a site config.
  • apic site-config:get-export - Get an export of a site config.
  • apic site-config:get-export-status - Get the status of an export of a site config.
  • apic site-config:get-import-status - Get the status of an import of a site config.

For more information, see Using the site-config commands.

apic sites Manage your sites.
  • apic sites:check - Run a platform check against all portal sites on a portal service.
  • apic sites:list - List the sites of a portal service.
  • apic sites:reset-upgrade-attempts - Reset the portal upgrade attempts.

For more information, see Using the sites commands.

apic themes Manage your themes.
  • apic themes:delete - Delete themes.
  • apic themes:disable - Disable themes.
  • apic themes:enable - Enable themes.
  • apic themes:list - Get a list of your themes.
  • apic themes:set-default - Set the default theme of the portal.

For more information, see Using the themes commands.

apic twig Manage the twig debugging operations on a specific portal site.
  • apic twig:debug-enable - Enable twig debugging for a portal site.
  • apic twig:debug-disable - Disable twig debugging for a portal site.
  • apic twig:debug-status - Get the current state of twig debugging for a specific site.

For more information, see Using the twig commands.

apic user Manage some Developer Portal user tasks.
  • apic user:add-role - Add one or more roles to one or more specified user accounts.
  • apic user:block - Block one or more users.
  • apic user:information - Retrieve information about your users.
  • apic user:remove-role - Remove one or more roles from one or more specified user accounts.
  • apic user:unblock - Unblock one or more users.

For more information, see Using the user commands.

apic version Get the version of your API Connect toolkit.
  • apic version --mode portaladmin - Get toolkit version.