Gilhari Microservice Framework
for JSON Persistence

Gilhari Microservice Framework

Gilhari RESTful APIs

The Gilhari framework presents template based REST APIs that are automatically adaptable to an app-specific object model. Please see the syntax and semantics of the object-model agnostic Gilhari REST APIs here.

Here are some examples of the RESTful APIs exposed by Gilhari for an object model consisting of Employee objects.

REST Operation URI Body Comments
GET http://localhost:80/gilhari/v1/Employee Retrieves all Employee objects
GET http://localhost:80/gilhari/v1/Employee?filter=exempt=true Retrieves all Employee objects who are exempt
GET http://localhost:80/gilhari/v1/Employee/getAggregate?attribute=id&aggregateType=COUNT Gets the count (aggregateType=COUNT) of the "id" attribute for all the Employee objects.
POST http://localhost:80/gilhari/v1/Employee/ Employee objects in JSON format Saves one or more Employee objects specified in the Body of the request
PUT http://localhost:80/gilhari/v1/Employee/updateEntity Employee objects in JSON format Updates one or more Employee objects specified in the Body of the request
PATCH http://localhost:80/gilhari/v1/Employee?filter=id=39 {"newValues":["exempt","false"]} Updates the exempt value to “false” for the Employee with id=39
DELETE http://localhost:80/gilhari/v1/Employee/deleteEntity Employee objects in JSON format Deletes one or more Employee objects specified in the Body of the request
DELETE http://localhost:80/gilhari/v1/Employee?filter=exempt=true Deletes all the exempt Employee objects

The file Gilhari_APIs.pdf (located in the docs directory of the Gilhari SDK) provides details on the syntax and semantics of various APIs exposed by the Gilhari RESTful JSON Persistence Service microservice framework. It also has some sample APIs for an app-specific Gilhari microservice that deals with Employee objects.

You may also find the Gilhari API details in the POSTMAN documentation by importing the "Gilhari REST API" collection in POSTMAN from the following link (File -> Import -> Import from Link): https://warped-rocket-9192.postman.co/workspace/Team-Workspace~a872b0cc-7dae-40af-872c-aec9a1b2d643/collection/5675780-eade11a5-d5d7-4475-8037-8f8461238d6b?action=share&creator=5675780