Command Line Options for Packaging Tool
This page explains the Packaging tool command line options. To see the full list of options, run pfxpackage without arguments. The options are specified in the command line using either -option=value or -option value1 value2 syntax.
Communication with Server
Mandatory
-url API_SERVER_URLoption specifies the API server base URL, such as https://www.pricefx.eu.Add
-timeoutoption to increase communication timeout. It is 30 seconds by default.To communicate with the server through a proxy, add
-proxy,-proxyUserand-proxyPasswordoptions.See also http://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html, the option
-Djava.net.useSystemProxies=trueis supported as well.
Security
User credentials are specified with
-user USERand-password PASSWORDoptions. You have to enter the password if the password option is not supplied.When two factor authentication is required by the server, supply either a 6-digit verification code using
-twoFactorVerificationCodeoption or a user secret token with-twoFactorSecretTokenoption.Add
-insecureoption to skip the server certificate verification.When you want to fetch/deploy objects from/to PlatformManager (Event Orchestration, Event Orchestration Scheduler), you need to set
-platformToken USERNAME:TOKENoption. The token can be generated in PlatformManager > Account > Account API Token section; USERNAME is taken from the Username column (for example 3354_technical_user).
Package Selection and Filtering
Add several
-include=<part>options to process (export or import) only specific package parts.Add several
-exclude=<part>options to exclude specified parts during processing.You can list available parts by running the tool with the
-listPartsargument.When no -include or -exclude options are present, all parts are processed.
Add
-filter=FILTERSPECoption to process only items that match theFILTERSPECexpression. It consists of:Constants: "double-quoted-string", number (starts with +-0123456789), true, false, null.
Path Expression extracts value from the processed item (JSON node), such as
.uniqueName.Dots are used to describe a path to a specific value in item's tree representation. It always has to start with a dot.
Binary operator combines constants and other expressions : ==, != ~= and or.
Parentheses and white spaces separate expressions from operators. Parentheses are required to combine binary operators.
A
FILTERSPECexpression matches the process item if it evaluates anything that is not: false, "false", "", null.To filter items with a specific a specific status value:
-filter .status=="ACTIVE"To filter items that are draft:
-filter .draft=trueTo filter items, in which formulaNature is not "library":
-filter .formulaNature!="library"To filter items, in which status is not "INACTIVE" and uniqueName (when ignoring character case) does not end with test:
-filter (.uniqueName~="(?i).*test")and(.status!="INACTIVE")
To include also Company Parameters data (CSV files) during import or export, add
-withDataoption.All files with names that start with a dot are ignored during import, unless -
includeDotFilesoption is present.
Package Content
Package is supplied either as a directory or as a ZIP file (file name with a .zip extension).
When import is run, the
-from PACKAGEoption is required.When export is run, the
-to PACKAGEoption is required.You cannot export to an existing package, unless you add the
-additiveoption. New files and directories are added, existing files are overwritten.You can overwrite an existing package ZIP file if you add the
-overwriteoption, it deletes the ZIP file before running export.When importing users, you can add the password property to user's JSON file in order to set up the user password. Passwords are never exported.
Logging and Troubleshooting
When using the filter option from the command line, double quotes might get consumed by shell/cmd. You have to escape them, for example:
Windows (cmd):
-filter .status=="""ACTIVE"""Mac/Unix (bash):
-filter .status==\"ACTIVE\"Mac/Unix (bash):
-filter '.status=="ACTIVE"'
The
-versionoption prints out a full version specification, a newer version might fix this.To log HTTP communication to the console, add the
-httpDebugoption.To record communication with the server, add
-httpRecordTo=filename.zipor-httpRecordTo=directory. The created ZIP file or directory can be then passed for further analysis. It is especially handy when troubleshooting data-driven issues.
Deploy behaviour
To skip validation errors in case that partition returns STATUS_VALIDATION_ERROR(-4), use
-continueOnValidationError=trueoption.