IBM Cloud Docs
IBM OpenPages CLI (ibmcloud openpages)

IBM OpenPages CLI (ibmcloud openpages)

The IBM OpenPages command-line interface (CLI) provides capabilities for IBM OpenPages. For example, you can use IBM OpenPages CLI to import and export configuration data, such as settings, application strings, role templates, and more.

Prerequisites

  • Install the IBM Cloud CLI.

  • Install the IBM OpenPages CLI by running the following command:

    ibmcloud plugin install openpages
    
  • Before you run ibmcloud openpages commands, log in to IBM Cloud by using the ibmcloud login command.

You're notified on the command line when updates to the IBM Cloud CLI and plug-ins are available. Be sure to keep your CLI up to date so that you can use the latest commands. You can view the current version of all installed plug-ins by running ibmcloud plugin list.

IBM Cloud CLI requires Java™ 1.8.0.

ibmcloud openpages help

On its own, the ibmcloud openpages help command displays the available top-level commands. When followed by another command, it displays specific help for that command.

ibmcloud (openpages|op) (help|h) [command]

Command options

command (string)
An ibmcloud openpages command. Optional.

Examples

Get a list of all ibmcloud openpages commands.

ibmcloud openpages help

Get help with the ibmcloud openpages objectmanager command.

ibmcloud openpages help objectmanager

ibmcloud openpages list

Use this command to get a list of all IBM OpenPages instances in your IBM Cloud account.

ibmcloud (openpages|op) (list|ls)

Command options

None.

Examples

ibmcloud openpages list

Output

The command returns the following output:

OpenPages application
0. instance_name (instance_GUID)
...
n. instance_name (instance_GUID)
No OpenPages application targeted.

ibmcloud openpages objectmanager

With the ibmcloud openpages objectmanager command, you can perform the following tasks:

  • Import (load) configuration data, such as object types and views, into OpenPages.
  • Export (dump) filtered or unfiltered configuration data from OpenPages. You can use this functionality, for example, to migrate configuration data from one instance to another.
  • Batch-load multiple loader files in a single session.

If you want to import and export instance data, you can use FastMap.

If you want to migrate data from an OpenPages on-premises environment to OpenPages as a Service, contact Support.

The ObjectManager commands are:

batch
Load (import) multiple loader XML files.
create-templates
Generate the ObjectManager.properties and ObjectManagerExportFilters-Example.xml files.
dump
Dump (export) to XML.
help
Get help for the ibmcloud openpages objectmanager command.
load
Load (import) from a single loader XML file.
validate
Check that a single loader file is well-formed.

ibmcloud openpages objectmanager batch

Use this command to load (import) multiple loader files.

ibmcloud (openpages|op) (objectmanager|om) batch BATCH_LOADER_DIR BATCH_LOADER_LIST_FILE

Command options

BATCH_LOADER_DIR
The directory where the BATCH_LOADER_LIST_FILE file and the loader files are stored.
BATCH_LOADER_LIST_FILE
The file name of the batch loader list file.

Prerequisites

  • Set a target instance by using the ibmcloud openpages select command.

  • Create a batch loader list file that lists one or more XML loader files.

    For more information, see Batch loader file syntax and sample.

Example: Batch mode

ibmcloud openpages om batch /op/batch_files/ batch_file_list.txt
Output

The command returns the following output:

Total Objects processed
Total Validation Errors
Total Exceptions
Processing finished
Elapsed time
Copied <file> to <directory>

ibmcloud openpages objectmanager create-templates

Generates the following files:

  • ObjectManager.properties
  • ObjectManagerExportFilters-Example.xml

You need to run the ibmcloud openpages objectmanager create-templates command at least one time.

ibmcloud openpages (objectmanager|om) (create-templates|c) DIRECTORY

Command options

DIRECTORY (string)
The full path of a local directory. The template files are created in this directory.

Examples

Create the templates and store them in the /home/tmp/objectmanager directory.

ibmcloud openpages om c /home/tmp/objectmanager

ibmcloud openpages objectmanager dump

Use this command to dump (export) data.

ibmcloud (openpages|op) (objectmanager|om) dump EXPORT_DIR FILE_PREFIX

Command options

EXPORT_DIR
The full path to the directory where you want the exported file to be saved. The ObjectManager.properties file must also be in this directory. If you want to use export filters, the ObjectManagerExportFilters.xml file must also be in this directory.
FILE_PREFIX
The prefix to append to the output file.

Prerequisites

  • Generate the template files for ibmcloud openpages objectmanager. See ibmcloud openpages objectmanager create templates
  • Copy the ObjectManager.properties file to the EXPORT_DIR.
  • If you're using export filters, copy the ObjectManagerExportFilters.xml file to the EXPORT_DIR.
  • Use the ObjectManager.properties file to specify the data to export. For more information, see Modifying the ObjectManager properties file.
  • Set a target instance by using the ibmcloud openpages select command.

Example: Exporting data

ibmcloud openpages om dump /home/files object_types
Output

The command creates the following file: /home/files/object_types-op-config.xml

ibmcloud openpages objectmanager load

Use this command to load (import) data.

ibmcloud (openpages|op) (objectmanager|om) load LOADER_FILE_DIR FILE_PREFIX

Command options

LOADER_FILE_DIR
The full path of the directory where the loader file is stored.
FILE_PREFIX
The prefix of the loader file.
For example, if the loader file is called myfile-op-config.xml, use myfile for this parameter.

Prerequisites

  • Set a target instance by using the ibmcloud openpages select command.

  • Prepare a loader file. The file name must use the pattern *-op-config.xml.

    For more information, see Working with loader files.

Example: Importing data

Load the /home/loader_files/myfile-op-config.xml file.

ibmcloud openpages om load /home/loader_files myfile
Output

The command returns the following output:

...
Total Objects processed
Total Validation Errors
Total Exceptions
Processing finished
Elapsed time
Copied <file> to <directory>

ibmcloud openpages objectmanager validate

Use this command to verify that a loader file is well-formed.

ibmcloud (openpages|op) (objectmanager|om) validate LOADER_FILE_DIR FILE_PREFIX

Command options

LOADER_FILE_DIR
The full path of the directory where the loader file is stored.
FILE_PREFIX
The prefix of the loader file.
For example, if the loader file is called myfile-op-config.xml, use myfile for this parameter.

Prerequisites

  • Set a target instance by using the ibmcloud openpages select command.
  • Requires a single loader file. The file name must use the pattern *-op-config.xml.

Example: Validating a file

ibmcloud openpages om validate /home/loader_files myfile

ibmcloud openpages select

Use this command to select the IBM OpenPages instance on which you want to run subsequent commands.

ibmcloud (openpages|op) (select|s) [GUID]

Command options

[GUID] (string)
The GUID of the instance you want to select. If you leave this parameter empty, the command returns a numbered list of instances. Type the number of the instance that you want to select.

Examples

Get a numbered list of instances.

ibmcloud openpages select

Output

The command returns the following output:

OpenPages application
0. instance_name (instance_GUID)
1. instance_name (instance_GUID)
No OpenPages application targeted.

ibmcloud openpages unselect

Use this command to deselect an IBM OpenPages instance.

ibmcloud (openpages|op) (unselect|u) [GUID]

Command options

GUID (string)
The GUID of the instance you want to deselect. If you leave this parameter empty, the command returns a numbered list of instances. Type the number of the instance that you want to deselect.

Examples

Get a numbered list of instances that are currently selected.

ibmcloud openpages unselect <instance_GUID>