Application programming interfaces (APIs) for HTTP Server
This topic provides information about HTTP Server for i5/OS APIs for CGI applications, configuration APIs, server instance APIs, group APIs, and triggered cache manager APIs.
Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . IBM recommends that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See IBM Service for more information.
HTTP Server supports the APIs listed below in C++, REXX, ILE C, ILE COBOL, and ILE RPG programming languages. Although all APIs are supported in all of these languages, most ILE C CGI applications will only need to use QtmhCvtDB, QzhbCgiParse, or QzhbCgiUtils. This is because ANSI C can work with stdin, stdout, and environment variables directly. ILE C CGI applications use ANSI C function calls to work with stdin, stdout, environment variables, and string functions for parsing stdin and environment variable data.
Parent topic:
Application Programming Interface
CGI application APIs
To use these APIs in a CGI application, bind the CGI program to *SRVPGM QZHBCGI in library QHTTPSVR. ILE C programs must include header file QSYSINC/H(QZHBCGI). CGI application programs must be written and compiled in Integrated Language Environment® ILE C, ILE RPG, and ILE COBOL.
- Get Environment Variable (QtmhGetEnv) API
- Put Environment Variable (QtmhPutEnv) API
- Read from Stdin (QtmhRdStin) API
- Write to Stdout (QtmhWrStout) API
- Convert to DB (QtmhCvtDB) API
- Parse QUERY_STRING Environment Variable or Post stdin data (QzhbCgiParse) API
- Produce Full HTTP Response (QzhbCgiUtils) API
- Send or Save CGI Stateful Data (QzhbCgiSendState) API
- Receive CGI Stateful Data (QzhbCgiRecvState) API
- Put environment variable with CCSID (QzsrPutEnvCCSID) API
- Get environment variable with CCSID (QzsrGetEnvCCSID) API
Configuration APIs
The configuration APIs are in *SRVPGM QZHBCONF in library QHTTPSVR. ILE C programs must include header file QHTTPSVR/H(QZHBCONF). While each individual API lists its own authorities, the following authorities are needed to run all configuration APIs:
- *OBJOPR, *READ, *ADD, and *EXECUTE to the QUSRSYS library
- *READ, *ADD, *DELETE, *EXECUTE, *OBJOPR, *OBJEXIST, and either *OBJMGT or *OBJALTER to the QUSRSYS/QATMHTTPC file
- *READ, *ADD, *DELETE, *EXECUTE, *OBJOPR, *OBJEXIST, and either *OBJMGT or *OBJALTER to the QUSRSYS/QATMHTTPA file
The QUSRSYS/QATMHTTPA file is the administration (ADMIN) server configuration file.
- Add Config Object (QzuiAddConfigObject) API
- Change Config Object Value (QzuiChangeConfigObject) API
- Close Apache Config File (QzuiCloseConfig) API
- Find Config Object (QzuiFindConfigObject) API
- Open Apache Config File (QzuiOpenConfig) API
- Remove Config Object (QzuiRemoveConfigObject) API
Server instance APIs
The server instance APIs are in *SRVPGM QZHBCONF in library QHTTPSVR. ILE C programs must include header file QHTTPSVR/H(QZHBCONF). While each individual API lists its own authorities, the following authorities are needed to run all server instance APIs:
- *OBJOPR, *READ, *ADD, and *EXECUTE to the QUSRSYS library
- *READ, *ADD, *DELETE, *EXECUTE, *OBJOPR, *OBJEXIST, and either *OBJMGT or *OBJALTER to the QUSRSYS/QATMHINSTC file
- *READ, *ADD, *DELETE, *EXECUTE, *OBJOPR, *OBJEXIST, and either *OBJMGT or *OBJALTER to the QUSRSYS/QATMHINSTA file
The QUSRSYS/QATMINSTA file is the administration (ADMIN) server instance file.
- Change Apache Server Instance Data (QzuiChangeInstanceData) API
- Create Apache Server Instance (QzuiCreateInstance) API
- Get Apache Server Instance Data (QzuiGetInstanceData) API
- Get Server Instance Names (QzuiGetInstanceNames) API
- Get Instance Type (QzuiGetInstanceType) API
Group file APIs
The group file APIs are in *SRVPGM QZHBCONF in library QHTTPSVR. ILE C programs must include header file QHTTPSVR/H(QZHBCONF).
Group file APIs are independent of HTTP Server type.
- Create a new Group File (QzhbCreateGroupList) API
- Read a Group File into Memory (QzhbOpenGroupList) API
- Free Group File from Memory (QzhbCloseGroupList) API
- Retrieve the next Group in the Group List (QzhbGetNextGroup) API
- Locate a named group in a Group List (QzhbFindGroupInList) API
- Retrieve the Name of a Group (QzhbGetGroupName) API
- Add a new Group to the end of a Group List (QzhbAddGroupToList) API
- Remove a Group from a Group List (QzhbRemoveGroupFromList) API
- Retrieve the next User in the Group (QzhbGetNextUser) API
- Locate a User in a Group (QzhbFindUserInGroup) API
- Retrieve the Name of a User (QzhbGetUserString) API
- Add a new user to the end of a Group (QzhbAddUserToGroup) API
- Remove a User or Element from a Group (QzhbRemoveUserFromGroup) API
TCM server operation APIs
The trigger cache manager server operation APIs may be used to start and stop trigger cache manager servers. The APIs are callable service implemented as an ILE entry point within the QZHTINOPS *SVRPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Start Triggered Cache Manager Server (QzhtStrTCMServer) API
- End Triggered Cache Manager Server (QzhtEndTCMServer) API
TCM basic configuration APIs
The trigger cache manager basic configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Create Triggered Cache Manager Server (QzhtCrtTCMServer) API
- Get Triggered Cache Manager Server Status (QzhtGetTCMServerStatus) API
- Delete Triggered Cache Manager Server Status (QzhtDltTCMServer) API
- Retrieve Triggered Cache Manager Basic Configuration (QzhtRtvTCMBasicConfig) API
- Change Triggered Cache Manager Basic Configuration (QzhtChgTCMBasicConfig) API
TCM trigger handler configuration APIs
The trigger cache manager trigger handler configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Trigger Handler Description (QzhtAddTCMTriggerHandlerDesc) API
- Retrieve Triggered Cache Manager Trigger Handler Description (QzhtRtvTCMTriggerHandlerDesc) API
- Change Triggered Cache Manager Trigger Handler Description (QzhtChgTCMTriggerHandlerDesc) API
- Remove Triggered Cache Manager Trigger Handler Description (QzhtRmvTCMTriggerHandlerDesc) API
TCM data source configuration APIs
The trigger cache manger data source configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Data Source Description (QzhtAddTCMDataSourceDesc) API
- Retrieve Triggered Cache Manager Data Source Description (QzhtRtvTCMDataSourceDesc) API
- Change Triggered Cache Manager Data Source Description (QzhtChgTCMDataSourceDesc) API
- Remove Triggered Cache Manager Data Source Description (QzhtRmvTCMDataSourceDesc) API
TCM cache target configuration APIs
The trigger cache manager cache target configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Cache Target Description (QzhtAddTCMCacheTargetDesc) API
- Retrieve Triggered Cache Manager Cache Target Description (QzhtRtvTCMCacheTargetDesc) API
- Change Triggered Cache Manager Cache Target Description (QzhtChgTCMCacheTargetDesc) API
- Remove Triggered Cache Manager Cache Target Description (QzhtRmvTCMCacheTargetDesc) API
TCM acknowledgement target configuration APIs
The triggered cache manager acknowledgement target configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Acknowledgment Target Description (QzhtAddTCMAckTargetDesc) API
- Retrieve Triggered Cache Manager Acknowledgment Target Description (QzhtRtvTCMAckTargetDesc) API
- Change Triggered Cache Manager Acknowledgment Target Description (QzhtChgTCMAckTargetDesc) API
- Remove Triggered Cache Manager Acknowledgment Target Description (QzhtRmvTCMAckTargetDesc) API
TCM host configuration APIs
The triggered cache manager host configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Host Description (QzhtAddTCMHostDesc) API
- Retrieve Triggered Cache Manager Host Description (QzhtRtvTCMHostDesc) API
- Change Triggered Cache Manager Host Description (QzhtChgTCMHostDesc) API
- Remove Triggered Cache Manager Host Description (QzhtRmvTCMHostDesc) API
TCM object dependency graph configuration APIs
The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these API.
- Add Triggered Cache Manager Object Dependency Graph Description (QzhtAddTCMODGDesc) API
- Retrieve Triggered Cache Manager Object Dependency Graph Description (QzhtRtvTCMODGDesc) API
- Change Triggered Cache Manager Object Dependency Graph Description (QzhtChgTCMODGDesc) API
- Remove Triggered Cache Manager Object Dependency Graph Description (QzhtRmvTCMODGDesc) API
TCM rule set configuration APIs
The triggered cache manager rule set configuration APIs are a callable service implemented as an ILE entry point within the QZHTINCONF *SRVPGM in the QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Rule Set (QzhtAddTCMRuleSet) API
- Retrieve Triggered Cache Manager Rule Set (QzhtRtvTCMRuleSet) API
- Change Triggered Cache Manager Rule Set (QzhtChgTCMRuleSet) API
- Remove Triggered Cache Manager Rule Set (QzhtRmvTCMRuleSet) API
TCM publishing rule configuration APIs
The triggered cache manger publishing rule configuration APIs are a callable service implemented as an ILE entry point within QZHTINCONF *SRVPGM in QTCM *LIB. The QTCM/H(QZHTINCONF) header file includes ILE C prototypes for these APIs.
- Add Triggered Cache Manager Publishing Rule (QzhtAddTCMPublishingRule) API
- Retrieve Triggered Cache Manager Publishing Rule (QzhtRtvTCMPublishingRule) API
- Change Triggered Cache Manager Publishing Rule (QzhtChgTCMPublishingRule) API
- Remove Triggered Cache Manager Publishing Rule (QzhtRmvTCMPublishingRule) API