This section describes the SIETS console and related principles that must be understood before working with it, and contains step-by-step instructions for running the SIETS console.
This section contains the following topics:
SIETS console is a simple text application for accessing the SIETS server directly using SIETS API.
The following steps provide a general description of how the SIETS server is accessed using the SIETS console:
Users enter command prompt commands for the SIETS server directly through the SIETS console, which is run from the.
The SIETS console submits each API command to the SIETS server.
The SIETS server responds by returning XML replies to the SIETS console, which are dumped on the command prompt screen.
Generally, in the SIETS console, the API command is entered as the command name followed by its parameters in predefined order, and the reply is returned as XML replies described in SIETS API Specification.
Commands parameters correspond to tag names in API XML requests and names of HTTP GET/POST parameters.
Each SIETS API command parameter has a name. Some command parameters have default
values, and some do not. When executing a command, if the parameter
value is not set, the
SIETS console takes the default value, or, if the parameter does not have the
default value, it asks for the value interactively by displaying the
parameter name and the equal sign
=
.
In the SIETS console you do not need to run the session initiation function. The session is initiated already when you run the SIETS console. However, you have to set the SIETS console parameters, which are the same as for the session initiation function plus the encoding parameter:
Title |
Description |
---|---|
|
SIETS server IP address or a host name. |
|
SIETS storage name. |
|
User name. |
|
User password. |
|
Function timeout period. If the function is not executed during this predefined timeout period, the command returns the error. |
|
Character encoding of input data and reply. Note: The textual data must comply with the encoding defined in a function parameter, or else the system returns a parsing error. Note: The terminal that you are using to access the SIETS console must be configured for the encoding you have set, and it must be capable to display all characters of the encoding, or else, some characters may not be displayed correctly. |
If these parameters are not set when starting the SIETS console, the SIETS console asks for them interactively by displaying the parameter name
and the equal sign
=
when executing the first function.
When calling the SIETS console, these parameters are set as options, for example, -u
. When already working in the SIETS console, these parameters are set as parameter names, for example, user
.
The SIETS console parameters can be changed in any time when running the SIETS console.
For each function there is a template that can be viewed before executing the function to ensure that all parameters are set. A function template contains the syntax of the SIETS API command and its parameters, and the corresponding XML request syntax of the corresponding command.
There are the following built-in commands in the SIETS console:
Title |
Parameter |
Description |
---|---|---|
help |
Displays the list of built-in commands and their descriptions and the list of templates. |
|
echo |
<SIETS console parameter name> |
Prints the SIETS console parameter value. |
show |
<function name> |
Prints the template of the function. |
exit |
Exits the SIETS console. |
To run the SIETS console, proceed as follows:
Login to the computer directly, using Telnet, or secure shell, where the SIETS server is installed.
To start the SIETS application, enter the following command with the options, which each corresponds to the SIETS console parameter:
sietsco -h <SIETS server IP address or a host name >, -p <SIETS server port number>, -s <SIETS storage name>, -u <user name>, -w <user password>
Note: You can skip the options, however, if the SIETS console parameters are not set when starting the SIETS console, the SIETS console asks for them interactively by displaying the parameter name
and the equal sign
=
when executing the first function.
Start executing SIETS API commands. To view the function syntax, run the built-in command show described in Built-in Commands.
There are the following two syntaxes for executing the SIETS API commands from the SIETS console:
function (param1, param2,
paramN)
function param1 param2
paramN
All parameters must be set in the order they are presented in the function template. If you want to use the default value for the parameter, you can leave it empty. If the parameter you want to have the default value is at the end of the parameters list, you can simply drop it. However, if the parameter you want to have the default value is at the beginning or in the middle of the parameters list, to leave it empty, you must use the function executing syntax with the brackets and parameters separated with commas.
Example:
search (john,50,,yes)
sets the parameter values to the following: query=john, docs=50, offset=10, relevance=yes, rate_form=0,
and rate_to=0
search john 50
sets the parameter values to the following: query=john, docs=50, offset=10, relevance=no, rate_form=0,
and rate_to=0