Uploading Required Search Files from the Command Line
After you create the required XQuery search module and the XML file, you must upload them to the CentraSite repository.
You can upload the XQuery search module and the XML file by executing the following command in the command line interface CentraSiteCommand.cmd (Windows) or CentraSiteCommand.sh (UNIX) of Command Central. The tool is located in <CentraSiteInstallDir>/utilities.
The command to start the command line tool is as follows. The example assumes that there is a user AdminUser who has the CentraSite Administrator role, and this user has the password AdminPass.
CentraSiteCommand add Search -url http://localhost:53307/CentraSite/CentraSite
-user AdminUser -password AdminPass -savedSearch TopXAPIsByAPIKeys.xml
-module apiusage.xquery -overwrite true -scope user
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. |
For more information about the usage of
add Search utility, see
Adding a Custom Reporting Search
from the Command Line.
After the command executes successfully, scroll through the Data Feed selection list of Add New Portlet dialog to find the new reporting search, TopXAPIsByAPIKeys.