API
Mercury DB (HgDB) is a system that allows you to manage data stored in the database via a rich set of services implementing SOAP, REST and RMI (Java client).
API usageโ
- Java Client โ the most popular solution used by customers who decided to implement the system. The open source client project hgdb-client-open is eagerly used in various integration projects.
- SOAP Services โ a solution used in integrations with the integration bus.
- REST Services โ a solution used to create GUI elements in presentation forms and editing case objects. REST services can also be used to analyze stored data through tools such as Grafana), which is a well-known tool for creating graphs and which also acts as an interface for monitoring changes. Integration can be provided by the open source data source project hgdb-grafana-datasource.
Various API security mechanismsโ
- Java Client โ uses the RMI protocol, which is secured with the
BASIC
authentication mechanism. - SOAP Services โ the
UsernameToken
sent in the SOAP request header is used to secure access to services. - REST Services โ to secure access to services, the OAuth 2.0 authentication and authorization mechanism is used (password-grant).
- In all cases, the system can be integrated with an external LDAP user repository.
Articles describing the APIโ
Some pages are still under construction and do not yet contain all the information. Please be patient.
๐๏ธ SOAP/REST Service Request Context
The article describes objects that are key elements of requests in communication with the database via SOAP and REST services. The Context object is used in all services and is the basis for analyzing user permissions and the form of the response. The widespread use in the HgDB solution resulted in the need to create a kind of communication standard between integrated systems. This is how the Context and Case Request Transportable Objects Open API project was created, which was used, among others, for communication between Mercury DB (HgDB) 3.0 and Iron - POI Excel Server.
๐๏ธ Case header
This article describes an object that is a key element of requests in communication with the database via SOAP and REST services. The CaseHeader header is necessary for implementing case update tasks in the database, supports the identification and update of the case type definition. This object contains predefined fields of the Case entity, which are used to identify the case, its status and other important information. The article also presents examples of case header construction in various formats (XML and JSON) and discusses the meaning of individual fields.
๐๏ธ Loading metadata
4 items
๐๏ธ Case as any object
Below is a description of building a case object as any XML or JSON definition. This form is used in SOAP services (methods with the XML suffix in their name) and REST services (services with the ExtRest suffix in their name).
๐๏ธ Case as a universal MRC object
This article describes the universal MRC object and its components. It is used in SOAP and REST services. Unlike the freedom to create case objects using ANY XML and ANY JSON schemas, the universal MRC object is strictly defined and uniquely describes any MRC object.
๐๏ธ PagedResult as a list of loaded data
Description and example of the implementation of the PagedResult output data, also called a paged result. The described format of the transmitted data is applicable wherever the response to the request returns lists of very large volume, which the client is unable to process in a single operation, where it is necessary to divide these lists into pages. PagedResult is a kind of response standard used in communication with the HgDB system. This chapter describes the type structure in the form of JSON (for REST services) and XML (for SOAP services). The object also has its representation (implementation) in Java and is used there in RMI communication.
๐๏ธ Testing the connection with method Echo
Each service implemented in the Mercury DB (HgDB) 3.0 system contains the echo method (a request sent using the POST method). It allows for verifying the correctness of the defined communication between the client and the server. An example of using the method is the implementation of the data source for the Grafana system: datasource.ts where the testDatasource() method uses the echo method call of the CaseSearchRest service.
๐๏ธ Case Recording Services and Methods
This article will describe the mechanisms accompanying the recording of a case to the Mercury DB (HgDB) database at the business layer level. Despite the existence of case recording methods in the system in services related to the logical layer, it is not recommended to use them. They are treated as obsolete. Maintaining them as explicit services is necessary due to compatibility with other products that use this layer directly.
๐๏ธ Data mining and aggregation services
5 items
๐๏ธ Comments on the cases
This page is under construction and does not yet have all the information. Please be patient.
๐๏ธ Quick Tasks
This page is under construction and does not yet have all the information. Please be patient.