Batch Administration Request

By using administration requests you can simply manage SynAdmin via a script or batch file. In a first instance administration requests effect a change of the state, whereas monitoring requests primarily show the state without changing it. With the parameter &action= in the URL http://<server>:<port>/<WebOffice application>/synadmin?client=adminbatch&user=batchadmin&password=<password_encoded>&action= administration requests can call commands to SynAdmin.

 

These parameters should be called in the URL:

client

user

password

action

further potential parameter

 

Configuration and selection of the encoded batchadmin password in the application configuration

The configuration of the password for the batchadmin user is defined in the application configuration.

 

icon_cross-reference

Please find more information about the configuration of the encoded batchadmin password in chapter Admin User for Batch Requests.

For security reasons, this password should not be identical to the password that is used to access SynAdmin.

 

After having configured a saved the password, you can get it encoded directly from the WebOffice 10.9 R4 application file (application_config.xml).

Open the application configuration in C:\Tomcat\webapps\<WebOffice-Applikation>\WEB-INF\classes\configuration\application_config.xml and search for BATCHADMIN_USER. The password is shown in the attribute pwd.

 

Getting the encoded password for 'batchadmin' user from the application configuration

Getting the encoded password for 'batchadmin' user from the application configuration

 

Administration parameter

The parameter action can assume the following content:

action=restart

restart of the application

 

action=reload_resources

reload resources for a certain project (with parameter &project=)

http://<server>:<port>/<WebOffice application>/synadmin?client=adminbatch&user=batchadmin&password=<batchadmin_password_encoded>&action=reload_resources&project=<project>

 

action=recreate_fts_index&subindex=...

Recreation of a defined subindex. Enter a complete subindex name. Sample:

 

Address a thematic subindex by using &subindex=<project name>_<external ID>

 

Using &subindex=ALL all subindices will be recreated. Sample:

http://<server>:<port>/<WebOffice application>/synadmin?client=adminbatch&user=batchadmin&password=<password_encoded>&action=recreate_fts_index&subindex=ALL

 

Using &subindex=ALL_OUTDATED all subindices with the state SCHEDULED, ABORTING, MISSING, OUT_OF_DATE or FAILED will be recreated. Sample:

http://<server>:<port>/<WebOffice application>/synadmin?client=adminbatch&user=batchadmin&password=<batchadmin_password_encoded>&action=recreate_fts_index&subindex=ALL_OUTDATED

 

icon_cross-reference

The complete URL for the recreation of a specific subindex can be found in the SynAdmin Full-Text Search Tab in the details of a particular layer. It is possible to add the parameter &password= for the password of the administration site (SynAdmin) to the URL. The password has to be written in plain terms (uncoded). If you use special characters in the password (e.g. #), be sure to encode those characters (e.g. %23).

By using the index-recreation time ALL subindices will be recreated periodically.

icon_comment

The recreation of subindices should be done automatically using batch scripts. Use the windows task scheduler for executing the scripts hourly/daily. During the recreation the projects could be used normally (search, etc.) because the index recreation is independent. Please consider, that the user running the windows task indeed has access to the batch script itself.

If you add the command  chcp 1252 at the begin of the batch file, you don't have to care about the encoding of special characters. Example:

 

date /t

time /t

 

@ECHO OFF

chcp 1252

echo.

start Recreate Subindex http://<server>:8080/<WebOffice-Applikation>/synadmin?client=adminbatch&action=recreate_fts_index&subindex=ALL&user=batchadmin&password=<Batchadmin Password"

 

You can download an example of a batch script for recalculating all FTS indices here. In this example, you must also adjust

the host name,

the name of the WebOffice application and

the SynAdmin password.

 

action=status_fts_index

provides information about the current state of a particular subindex. Complete sub-index name required.

 

The following values can be used for the parameter <subindexname>:

 

1. Global subindex - Full name of a Global Subindex as listed in WebOffice SynAdmin - see screenshot below using the Show Subindex Details button

 

Example:

 

2.Thematic subindex - Full name of a Thematic Subindex as listed in WebOffice SynAdmin - see screenshot below using the Show Subindex Details button

 

The designation of thematic sub-indices consists of the project name and the external ID of the search layer (<project name>_<ID for external search>).

Example:

 

3.subindex=ALL - Calculation of all defined subindices

Example:

Response

The following answers can be returned for the parameter action=status_fts_index:

OK (A list of all defined subindices with their current status is returned.)

 

icon_comment

The state of a FTS subindex can have the following values:

SCHEDULED

CREATING

CREATED

UNNEEDED

MISSING

FAILED

ABORTING

OUT_OF_DATE

NOT_NEEDED

PENDING_COMMIT

The value UNKNOWN_SUBINDEX_NAME is returned, if the subindex does not exist.

 

icon_cross-reference

Please pay attention to WebOffice Project's Monitoring for monitoring the ArcGIS Server services (Esri System Monitor) and your WebOffice 10.9 R4 projects.