Navigation:  Administration >

Batch Administration Request

Previous pageReturn to chapter overviewNext page

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.

 

The parameters in the URL should be called in the following order:

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.

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

Note: 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.5 SP2 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=<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=<password_encoded>&action=recreate_fts_index&subindex=ALL_OUTDATED

 

Note: 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).

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

Note: 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 http://<server>:8080/<WebOffice-Applikation>/synadmin?client=adminbatch"&"action=recreate_fts_index"&"subindex=ALL"&"password=xxx

 

action=status_fts_index&subindex=...

provides information about the current state of a certain subindex.  Enter complete subindex name. Sample:

 

 

Using &subindex=ALL the state of all subindices will be shown. Sample:

 

Note: 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.

 

IMPORTANT Note: Keep in mind that windows .bat files need a special syntax implying that all & and | that are components of the URL have to be quoted. An example for a batch file that will recreate a specific subindex could look like:

 

start http://<server>:8080/<WebOffice application>/synadmin?client=adminbatch"&"action=recreate_fts_index"&"subindex=user@http://<server>:6080/arcgis/SampleProject/SampleProject_Cadaster/MapServer//Properties"&"password=xxx

 

You can download a sample of a batch script for recreating all FTS-Indices here. In this sample you have to adjust

the host-name,

the name of the weboffice application and

the password of synadmin.

 

action=get_authorized_projects

returns a semicolon (;) separated list of the project IDs

Note: This administration request only works with WebOffice usermanagement. By using this request please add user and password (encoded) of the WebOffice usermanagement to this request. Do not use the 'batchadmin' user.

 

Getting the encoded password of WebOffice usermanagement can be performed by configuring it temporarily as 'batchadmin' password, please check above Configuration and selection of the encoded 'batchadmin' password in the application configuration.

 

Example:

Example response:

project1;project2;project3

 

action=get_project_configuration

This request downloads the project configuration.

Note: This administration request only works with WebOffice usermanagement. By using this request please add user and password (encoded) of the WebOffice usermanagement to this request. Do not use the 'batchadmin' user.

 

Example:

The response is the XML file of the project configuration.

 

Note: Please pay attention to WebOffice Project's Monitoring for monitoring the ArcGIS Server 10.5.1 services (Esri System Monitor) and your WebOffice 10.5 SP2 projects.