The DOKA-NG Web Services Platform lets you build applications, websites, and services, based on the same infrastructure as DOKA-NG.
Using DOKA-NG APIs, applications can directly make use of DOKA-NG and DOKA-NG Cloud Platform resources. DOKA-NG transactions are available through the API layer as directly launched from the DOKA-NG application.
DOKA-NG Web Services are based on the flexibility of the REST style of architecture and use many Java Spring boot framework features, such as Spring Security and Spring Boot Actuator.
To login to the Swagger API:
http://<IP Address>:<Port>/login
Current link to Swagger UI: http://10.8.0.49:8180/
- expected result: The login window displays.
After you login, you can explore the available APIs and their format. The Swagger UI section structure is similar to the DOKA-NG menus.
The DOKA-NG API Swagger enables you to visualize and interact with API resources.
GET requests include all filtering-required data as parameters in the URL; for example, Get users API.
The response contains the execution status and list of records based on supplied filtering and pagination.
POST requests are used to launch the DOKA-NG transactions, for example, Opening an LC/Guarantee.
All Post transactions APIs are implemented in an asynchronous fashion:
/v1/systemAdministration/getTransactStatus
is designed to supply the status progress – (see Step 3 below).
Below is a sample Assets update API flow:
Get X-CSRF-TOKEN for future use - Request Forgery (CSRF) Prevention:
In order to support, a CSRF token should be supplied in a X-CSRF-TOKEN cookie. To get the CSRF token there is /csrf GET API – not changed during the session
Post API Invocation:
POST requests supply an input json format data in the message body and a X-CSRF-TOKEN cookie.
Post response contains success status and INR ID that represents transaction request unique reference number.
Get Transaction Status
getTransactStatus API, systemAdministration section, provides the transaction execution status and progress. The statuses are as follows: 'I' – Inserted, 'P' – Processed, 'E' – Error.