Adding a Custom Reporting Search from the Command Line
You can add a custom XQuery reporting search by executing the following command in the command line interface CentraSiteCommand.cmd (Windows) or CentraSiteCommand.sh (UNIX) of CentraSiteCommand. The tool is located in the directory <CentraSiteInstallDir>/utilities.
If you start this command line tool with no parameters, you receive a help text summarizing the required input parameters.
The parameters of the command are case-sensitive, so for example the parameter -url must be specified as shown and not as -URL.
If you omit the passwords from the command, you will be prompted to provide them.
The syntax for the command is:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Search [-url <CENTRASITE-URL>] -user <USER-ID>-password<PASSWORD>-savedSearch <SAVED-SEARCH>[-module <XQUERY-MODULE>] [-overwrite<CONFIRM-OVERWRITE>] [-scope <SCOPE>]
The input parameters are:
Parameter | Description |
-url | Optional. The URL of the CentraSite registry. Default value is http://localhost:53307. |
-user | The user ID of a registered CentraSite user. For example, a user who has the CentraSite Administrator role. |
-password | The password for the registered CentraSite user identified by the parameter -user. |
-savedSearch | Name of the saved search XML file. |
-module | The fully qualified namespace of the XQuery module. |
-overwrite | Specifies whether to overwrite an existing XQuery module. Possible values: true - overwrite existing XQuery module; false - do not overwrite existing XQuery module. |
-scope | Specifies the folder to store the newly added search. Possible values: global - stores the search information in Default Organization folder; org - stores the search information in the user's organization folder; user (default value) - stores the search information in the user folder. |
Example:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Search -url http://localhost:53305/CentraSite/CentraSite -user Administrator -password manage -savedSearch MySearch.xml -module MySearchQuery.xquery -overwrite true -scope org
The response to this command could be:
Executing the command : add Search
Successfully executed the command : add Search
Important: | CentraSite relies on file extensions to determine a file's type. When you upload a saved search XML file or an XQuery module from your local machine using the command line, be sure you specify the name of the file along with its extension (.xml or .xquery) so that CentraSite can determine the file's type and mark it correctly in the repository. |