The Command Line Interface (CLI) is fast way to work with the web services. It consists of a set of tools can be use to perform basic operations like:
Create, Update, Read, List and Delete web services based on YAML files.
Read the Debugger log, with filter options.
You don't need to use the CLI to work with web services. Integrated into the Admin interface there is a complete set of screens to interact with every part of the web services. Please read the web service GUI section included in this manual.
The "WebserviceConfig.pl" was developed in order to create basic, but fast and powerful tool to work with web service configurations. It gives you the ability to perform the following actions:
Add: to create web services using a YAML file as the configuration source.
Update: to change an existing web service, the configuration can be changed using a different or modified YAML file.
Read: to get the current web service configuration displayed on the screen.
List: to get a complete list of all the web services registered in system.
Delete: to delete a web service from the system. Be careful when you use it, because this action can't be undone.
A web service READ operation will display all the configuration as plain text on the screen, including any stored passwords. Please be aware of this and take the needed precautions!
Example: Creating a new web service configuration:
shell> OTRS_HOME/bin/otrs.WebserviceConfig.pl -a write -n <webservice_name> -f /path/to/yaml/file
Also you can use 'otrs.WebserviceConfig.pl' with following options:
-a read -i <webservice_id> - To read a stored configuration.
-a write -n <webservice_name> -f /path/to/yaml/file - To create a new web service.
-a write -i <webservice_id> -f /path/to/yaml/file - To update a web service.
-a list - To list available web services.
-a delete -i <webservice_id> - To delete a web service.
Another available tool on the command line is the "otrs.GenericInterfaceDebugRead.pl" script, which is an interface to search for web service debugger log entries.
Example: Searching for debugger log entries:
shell> bin/otrs.GenericInterfaceDebugRead.pl
Optional parameters can be used for the "otrs.GenericInterfaceDebugRead.pl" script:
-c - to filter by Communication ID (md5sum format).
-t - to filter by CommunicationType ('Provider' or 'Requester').
-a - to filter by date (At or After a date).
-b - to filter by date (At or Before a date).
-i - to filter by IP Address (must be valid IPv4 or IPv6 address).
-w - to filter by Web Service ID.
-d - to include detailed communication data.
Example: Searching for debugger log entries with all parameters:
shell> ./otrs.GenericInterfaceDebugRead.pl -c a7cc4d9f5c70387a9bfbe1351bc88966 -t Provider -a '2011-07-22 00:00:00' -b '2011-07-26 00:00:00' -i 127.0.0.1 -w 123 -d 1
It is highly recommended to include at least one of the filter options listed above, and even more if the "-d" option is selected, because a lot of information can be retrieved from the data base and displayed on the screen, this could result in slow response times and much more information than what you really needed.