Administration
The webPDF REST-API web services offer the option of querying the status, changing the configuration of the server or restarting it.
Authorization with administrator rights is required to access this area of the web service API.
Administration is done via the REST methods in the section /admin/... ( API {REST} ).
Example: Get server status: GET /admin/server/status ( API {REST} )
A detailed description of the individual endpoints with their parameters can be found in the API description of the respective endpoint.
Configuration checks before saving
POST /admin/configuration ( API {REST} ) checks and saves a configuration file of the server. The request names the file (configurationType), the purpose (configurationMode: validate only checks, write checks and then saves), the new contents (configuration) and the checks to run (configurationChecks). When a check fails, nothing is saved, and the response carries the error code of the check, see the error codes. A request without configurationChecks runs no check.
The checks of application.xml are executable, tsa, license, signature, locale and, since 10.0.8, font; the API description says what each of them checks.
Font directories
Since 10.0.8, the check font validates the fontPath of the toolbox, converter, pdfa, signature, ocr and barcode web services in the submitted application.xml by the rule the server applies when a web service starts (see Directories). You learn about a font directory that would keep a web service from starting before you save it. Add the check to the request, together with the contents of application.xml as GET /admin/configuration/application returns them:
"configurationChecks": [ { "checkType": "font" } ]
- Only a web service that is enabled (
enabled) in the submitted configuration is checked. A web service whose element is missing counts with the default values. - A directory is refused when it does not exist or is not a valid path, when it cannot be read, or when neither it nor the folders read with it contain a font file. These folders are its subfolders and the font folder of the user account that runs the server with its subfolders - the latter with a
fontPathonly as long asuseUserFontsis notfalse, without afontPathalways. The "Pdfa" web service reads TrueType, OpenType and Type 1 (.pfb) fonts, the other web services TrueType fonts and collections only. - Without
fontPath, the check looks at the font directories of the operating system and of the user account for the "Toolbox", "Converter" and "Pdfa" web services, whateveruseUserFontssays. The "Signature", "OCR" and "Barcode" web services start without fonts in this case and are not checked. - The first problem is reported, in the order "Toolbox", "Converter", "Pdfa", "Signature", "OCR", "Barcode", with the error
ADMIN_CONFIG_VALIDATE_ERROR(-48). The reason names the web service, the attribute (webservices/<web service>/@fontPath) and the directory. The response contains no file names and no font names. - The check looks at file names only and opens no font file. A directory whose only font file is defective passes, as it does when the web service starts.
- The directories are checked on the server that handles the request. In a cluster, another node can have other directories; the check does not look at them. The check judges the values of the submitted configuration.
- A very large directory tree, for example the root of a drive as
fontPath, takes time to search. The search ends at the first font file it finds.