AR System API architecture
API is a method to enable communication between the AR System server and the web services. AR System employs the following APIs:
- REST API—A web service that conforms to the architectural principles of Representational State Transfer (REST).
- Plug-in API—Extends the AR System server to integrate with external data sources.
- C and Java API—Creates an interface layer between the AR System server and C-based and Java-based AR Systemclients.
AR System REST API architecture
The API is a web service that conforms to the architectural principles of Representational State Transfer (REST). Each API is called by issuing a standard HTTP request method: POST, GET, PUT, or DELETE (more commonly known as the CRUD operations: Create, Read, Update, and Delete). The REST API is a simple stateless architecture that runs over the HTTP. The advantage of REST is having a limited number of operations for the interactions between clients and services.
The REST API uses the base URI for the web service, such as https://<localhost>:<port>/api/{namespace}/{version}
- api is the default prefix.
- namespace is used to help separate the different APIs.
- version is the version used for particular REST API.
For more information about the REST API, see Integrating-AR-System-forms-with-a-third-party-application-by-using-the-REST-API.
AR System plug-in API architecture
AR System clients perform external data source operations on external forms through the AR System server, plug-in service, and plug-in APIs. The plug-in service extends the AR System server to integrate with external data sources. The AR System serverconnects to the plug-in service, which activates the plug-ins.
Plug-in architecture
The arrows in this figure identify the directions in which each program or process can initiate API function calls. Data can flow in any direction.
AR System client code links to the provided C API libraries. The C APIs create an interface layer between the AR System server and C-based AR System clients. The Java API serves the same function for Java-based clients. AR System clients perform all database operations through the API interface.
AR System includes a plug-in server that extends its functionality to external data. External data is the data that is not contained in the AR System database. The plug-in service supports three types of plug-ins with corresponding C and Java APIs:
- AREA plug-in
- ARDBC plug-in
- AR System Filter API plug-in (AR Filter)
AR System offers the following ready-to-use plug-ins that you access through Developer Studio:
- AR System External Authentication (AREA) Lightweight Directory Access Protocol (LDAP) plug-in
- AR System Database Connectivity (ARDBC) LDAP plug-in
Both plug-ins access LDAP services.
For information about the C plug-in APIs, see AR-System-plug-in-API-functions. For information about the Java Plug-in API, see the online documentation located at ARSystemServerInstallDir\ARserver\api\javaplugins\arpluginsdoc VerNum .jar.
For information about configuring and running all types of plug-ins, see Enabling Plug-ins.
AR System C and Java API architecture
AR System client code links to the provided C API libraries. The C APIs create an interface layer between the AR System server and C-based AR System server clients. The Java API serves the same function for Java-based clients. AR System clients perform all database operations through the API interface.
C and Java API architecture
The arrows in the preceding figure identify the directions in which each program or process can initiate API function calls. Data can flow in all directions.
C API
The clients use the C APIs to manipulate data. For example, the clients use C APIs to create, retrieve, update, and delete schemas, entries, and menus, and to control workflow. You can use the C API to extend AR System functionality.
The AR System API contains data structures that store simple and complex information. Structures that store simple information, such as the type of value or the product of an arithmetic operation, serve as the building blocks for complex structures.
You can run API programs by using the following methods:
- From a command line.
- From the AR System by using the following options:
- In the Set Field $PROCESS$ action from an active link, filter, or escalation
- With the Run Process action in an active link, filter, or escalation
The C APIs consist of a set of functions, most of which cause the server to perform a specific database or data source operation and return a result. For example, you can create an entry or retrieve information about a particular AR System object. AR-System-C-API-functions describes the purpose and use of each AR System C API function. AR System plug-in API functions describes the purpose and use of the common AR System, AREA, ARDBC, and AR filter API plug-in functions.
In addition, almost all of the AR System C API functions accept one or more structure-type parameters. Data-structures explains some of the most common structures and the operations to which they apply. The ar.h file defines the types. If you understand the functions and structures that comprise the API, you can interact with the AR System server to customize and extend your applications.
The driver directory contains source code for the driver program. This program provides a command-line interface for calling AR System C API functions. The driver program also includes print routines for every data structure in the API, making it a useful debugging tool. See Using-the-driver-program-from-the-command-line for additional information about this topic.
Java API
The AR System Java API is a collection of Java classes that provide the full AR System API functionality in a Java development environment. The Java API:
- Provides an object model of AR System server entities (also called server objects), definitions, and data.
- Includes a single class, ARServerUser, that provides the context and the methods required to interact with the AR System server.
The JavaDriver directory contains source code for a Java program like the C driver program.
Use the AR System Java API to perform the following tasks:
- Write server-side web applications that you access through the Java server page (JSP) or Java servlets web tier layer.
- Implement AR System clients in Java.
For more information about the Java API, see AR-System-Java-API-overview and the Java API documentation HTML files in the ardocVerNum.jar file in the \Arserver\Api\doc folder (Windows) or the /ARServer/api/doc folder (UNIX).
To access the Java API documentation, unzip the ardoc VerNum .jar file to create a tree of directories, and then open the index.html file.
Comparison of the Java and C APIs
The AR System Java and C APIs have many differences such as different naming conventions and the following:
Java API | C API |
---|---|
The Java Virtual Machine (JVM) uses garbage-collecting functions to automatically deallocate objects that are created with the Java API. | The C API includes a set of memory deallocating functions that you can use to deallocate memory. |
In the Java API, the ARServerUser object provides server access information with every call. | In the C API, the control parameter provides server access information with every call. |