Help - API Hook Definitions
 

API Hooks are described in the API Hook Reference Manual.
For quick reference, here is a table of contents:

Contents
|__Global WebHooks
|  |__Encryption
|  |__Encoding
|  |__TraceLog
|__Server WebHooks
|  |__ServerInitialisation
|  |__ServerTermination
|  |__ResourceNameTranslation
|  |__ErrorLog
|  |__AuditLog
|__Resource WebHooks
|  |__UserAuthentication
|  |__AccessControl
|  |__ResourceType
|  |__CommandProcessing
|  |__ServerInclusions
|__Mail WebHooks
   |__Deliver
   |__Receive
   |__Resolve
   |__Rewrite
Config:/Hook/*/
Config:/Server/*/Hook/*/
Server:/Hook/*/
Config:/Security/Resource/*/Hook/*/
Config:/Mail/Hook/*/
SettingExplanationDefault /
Example
Data
Type
Access
R,W,A,D
Interface The type of API interface to call. Supported Languages are "C", "Perl", "Rexx" and "Macro". Macro IntegerR,W
Module For Macro Modules:

The local URL of the HTML page containing Web Macros to execute. The result code of the API call is obtained by evaluating the text returned by the HTML page as an integer value. For this reason, you should not include any HTML comments in your page, unless they occur after the result code.

Example: /myhooks/login.htm

For C Modules:

The name of the operating system library module that contains the hook function. If the module is contained on the operating system's path, you do not need to specify a directory, and typically also do not need to specify a file extension, unless it is non-standard.

Example: MyHooks

For Rexx Modules:

You should always include the file extension, and must specify a full path unless the module is on your operating system PATH.

Example: e:/powerweb/rexx-bin/login.cmd

For Perl Modules:

Specify the name of the Perl Package. Do not include a file extension or a path. Remember that package names are case sensitive. If the package is not contained within the "perl-bin" directory, you should specify the directory within your operating system's PERLLIB environment variable setting.

Example: login

MyDLL TextR,W
Function For C Modules:

The name of the function within the module. For operating systems that don't allow symbolic function names to be exported, this can be an integer ordinal number in text format.

For Macro and Rexx Modules:

This setting is ignored because Rexx currently does not support calling a function within a module.

For Perl Modules:

Specify the name of the function within the Perl package, remembering that Perl is case sensitive.

MyFunction TextR,W
Cache Whether to cache the API call. In the case of a C interface this means keeping the DLL loaded. In the case of a Rexx interface, it means storing the tokenised version of the Rexx module in memory, avoiding a disk read and a compile. Perl packages are always compiled before use and subsequent references within the same session use the compiled version. WebMacros are cached according to the global cache settings for your server. Yes IntegerR,W
Parameters This is a "directory" of variables to pass over to the hook function when it is executed. At execution time, these variables are aliased into the "parameters:/" variable directory. All the variables are read-only at that point to prevent multiple simultaneous requests from interfering with each other.

The major reason for specifying parameters to hook functions is to be able to call the same function in the same module for different purposes for different resources.

. Text ListR,W