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_URL
 option specifies the API server base URL, such as https://www.pricefx.eu.Add
-timeout
option to increase communication timeout. It is 30 seconds by default.To communicate with the server through a proxy, add
-proxy
,Â-proxyUserÂ
andÂ-proxyPassword
options.See also http://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html, the option
-Djava.net.useSystemProxies=trueÂ
is supported as well.
Security
User credentials are specified with
-user USER
and-password PASSWORD
options. 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
-twoFactorVerificationCode
option or a user secret token with-twoFactorSecretToken
option.Add
-insecure
option 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:TOKEN
option. 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Â
-listParts
argument.When no -include or -exclude options are present, all parts are processed.
Add
-filter=FILTERSPEC
 option to process only items that match theÂFILTERSPEC
expression. 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Â
FILTERSPEC
expression 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=true
To 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
-withDataÂ
option.All files with names that start with a dot are ignored during import, unless -
includeDotFilesÂ
option 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 PACKAGE
 option is required.When export is run, theÂ
-to PACKAGE
 option is required.You cannot export to an existing package, unless you add the
-additiveÂ
option. New files and directories are added, existing files are overwritten.You can overwrite an existing package ZIP file if you add the
-overwriteÂ
option, 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Â
-versionÂ
option prints out a full version specification, a newer version might fix this.To log HTTP communication to the console, add the Â
-httpDebug
 option.To record communication with the server, addÂ
-httpRecordTo=filename.zipÂ
or-httpRecordTo=directory
. The created ZIP file or directory can be then passed for further analysis. It is especially handy when troubleshooting data-driven issues.
Found an issue in documentation? Write to us.
Â