This chapter describes the requirements for creating an OpenAPI application. It also describes how to use the synchronous and asynchronous sample code available with OpenAPI.
This section describes the header file, library, and environment variables used by an OpenAPI application.
Note: For more information, see the readme.
Each application source file that invokes an OpenAPI function must include the OpenAPI header file (iiapi.h). This header file includes a platform-dependent header file, iiapidep.h, which configures OpenAPI for a particular platform.
When using OpenAPI, an application must link with the OpenAPI library. Where applicable, a shared library can also be provided. Applications may also need to be linked with the standard Ingres runtime library.
The following user environment variables are used by OpenAPI:
The II_API_TRACE environment variable specifies the desired trace level of OpenAPI. When it is not defined, it has a value of 0. You can set the II_API_TRACE environment variable to one of the following values:
Value |
Action |
|---|---|
1 |
Display fatal error messages |
2 |
Display non-fatal error messages |
3 |
Display warning messages |
4 |
Display checkpoint messages, such as which OpenAPI function is being executed |
5 |
Display detail information, such as values of input and output parameters |
The II_API_LOG environment variable specifies the desired output file for all OpenAPI tracing.