1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: genericinterface-webservice-cli.xml,v 1.1 2012/02/23 13:44:38 mg Exp $ -->
<section id="webservice_cli">
<title>Web Service Command Line Interface</title>
<para>
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:
</para>
<para>
<itemizedlist>
<listitem>
<para>
Create, Update, Read, List and Delete web services based on YAML files.
</para>
</listitem>
<listitem>
<para>
Read the Debugger log, with filter options.
</para>
</listitem>
</itemizedlist>
</para>
<note>
<para>
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.
</para>
</note>
<section id="webservice_cli_webserviceconfig">
<title>Web Service Configuration</title>
<para>
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:
</para>
<para>
<itemizedlist>
<listitem>
<para>
Add: to create web services using a YAML file as the configuration source.
</para>
</listitem>
<listitem>
<para>
Update: to change an existing web service, the configuration can be changed
using a different or modified YAML file.
</para>
</listitem>
<listitem>
<para>
Read: to get the current web service configuration displayed on the screen.
</para>
</listitem>
<listitem>
<para>
List: to get a complete list of all the web services registered in system.
</para>
</listitem>
<listitem>
<para>
Delete: to delete a web service from the system. Be careful when you use it,
because this action can't be undone.
</para>
</listitem>
</itemizedlist>
</para>
<warning>
<para>
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!
</para>
</warning>
<para>
Example: Creating a new web service configuration:
</para>
<para>
<screen>
shell> OTRS_HOME/bin/otrs.WebserviceConfig.pl -a write -n <webservice_name> -f /path/to/yaml/file
</screen>
</para>
<para>
Also you can use 'otrs.WebserviceConfig.pl' with following options:
<itemizedlist>
<listitem>
<para>
<command>-a read -i <webservice_id></command> - To read a stored
configuration.
</para>
</listitem>
<listitem>
<para>
<command>-a write -n <webservice_name> -f /path/to/yaml/file</command>
- To create a new web service.
</para>
</listitem>
<listitem>
<para>
<command>-a write -i <webservice_id> -f /path/to/yaml/file</command> -
To update a web service.
</para>
</listitem>
<listitem>
<para>
<command>-a list</command> - To list available web services.
</para>
</listitem>
<listitem>
<para>
<command>-a delete -i <webservice_id></command> - To delete a web
service.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="webservice_cli_debugger">
<title>Web Service Debugger</title>
<para>
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.
</para>
<para>
Example: Searching for debugger log entries:
</para>
<para>
<screen>
shell> bin/otrs.GenericInterfaceDebugRead.pl
</screen>
</para>
<para>
<itemizedlist>
<para>
Optional parameters can be used for the "otrs.GenericInterfaceDebugRead.pl"
script:
</para>
<listitem>
<para>
<command>-c</command> - to filter by Communication ID (md5sum format).
</para>
</listitem>
<listitem>
<para>
<command>-t</command> - to filter by CommunicationType ('Provider' or
'Requester').
</para>
</listitem>
<listitem>
<para>
<command>-a</command> - to filter by date (At or After a date).
</para>
</listitem>
<listitem>
<para>
<command>-b</command> - to filter by date (At or Before a date).
</para>
</listitem>
<listitem>
<para>
<command>-i</command> - to filter by IP Address (must be valid IPv4 or IPv6
address).
</para>
</listitem>
<listitem>
<para>
<command>-w</command> - to filter by Web Service ID.
</para>
</listitem>
<listitem>
<para>
<command>-d</command> - to include detailed communication data.
</para>
</listitem>
</itemizedlist>
</para>
<para>
Example: Searching for debugger log entries with all parameters:
</para>
<para>
<screen>
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
</screen>
</para>
<note>
<para>
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
<emphasis>a lot of </emphasis> 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.
</para>
</note>
</section>
</section>
|