Gilhari RESTful JSON Persistence Service APIs


Download Gilhari RESTful JSON Persistence Service APIs


Preview text

Gilhari RESTful JSON Persistence Service APIs

API Route Path Prefix

http://:/gilhari

API

Main URI

Query Parameters Body Parameters (req.query params) (req.body params)

Comments with example URIs (in bold)

GET

/:version/:class

filter

deep

maxObjects

/:version/:class/getObjectById

filter

Query all objects of a particular type (class)
http://localhost:80/gilhari/v1/Employee Query all qualifying objects of a particular type (class) based on the filter condition
http://localhost:80/gilhari/v1/Employee?filter=exempt=true
Retreive only the top level objects if deep=false otherwise retreive related (linked) objects also (default value for 'deep' is true)
http://localhost:80/gilhari/v1/Employee?deep=false Limit on the number of top-level objects
http://localhost:80/gilhari/v1/Employee?maxObjects=10
Query an object by its primary key (id); filter identifies the primary key
http://localhost:80/gilhari/v1/Employee/getObjectById?filter=i d=40

deep

/:version/:class/getAggregate

attribute

aggregateType filter

/:version/:class/access

attribute

entity

deep

Retreive only the top level object if deep=false otherwise retreive related (linked) objects also (default value for 'deep' is true)
http://localhost:80/gilhari/v1/Employee/getObjectById?filter=i d=40&deep=false
Query an aggregate value (COUNT, SUM, AVG, MIN, MAX) for an attribute
http://localhost:80/gilhari/v1/Employee/getAggregate?attribut e=id&aggregateType=COUNT COUNT, SUM, AVG, MIN, MAX Query the aggregate value over only the qualifying objects based on the filter condition
http://localhost:80/gilhari/v1/Employee/getAggregate?attribut e=compensation&aggregateType=MAX&filter=exempt=false
Query (lazy) for a contained (referenced) object indicated by the given 'attribute' name of an entity; The "entity" in the body needs to have only the connecting key value
http://localhost:80/gilhari/v1/A/access?attribute=aB Retreive only the top level referenced objects if deep=false otherwise retreive their related (linked) objects also (default value for 'deep' is true)

/:version/quit/now POST /:version/:class

PUT

/:version/:class/updateEntity

entity
deep entity deep

Shuts down the Gilhari microservice; Cleans up database connections and other internal data structures.
http://localhost:80/gilhari/v1/quit/now
Save (Insert) one or more JSON objects; One or more JSON objects that need to be saved are specified using the "entity" tag in the Body of the request.
Only the mapped attributes specified for the class in the ORM specification are saved in the database. So, if an original JSON object in the body has more attributes, they will be ignored - the object will essentially be trimmed when saved.
http://localhost:80/gilhari/v1/Employee/
Save only the top level objects if deep=false otherwise save related (linked) objects also (default value for 'deep' is true)
Update one or more JSON objects; One or more JSON objects that need to be updated are specified using the "entity" tag in the Body of the request.
http://localhost:80/gilhari/v1/Employee/updateEntity
Update only the top level objects if deep=false otherwise update related (linked) objects also (default value for 'deep' is true)

PATCH /:version/:class

DELETE /:version/:class/deleteEntity

filter deep

/:version/:class

newValues
entity deep

Bulk-update all objects of a particular type (class); The new values of the attributes for the JSON objects to be updated must be specified using the "newValue" tag in the Body of the request. The new values are specified in a comma separated name value pair.
http://localhost:80/gilhari/v1/Employee Bulk-update only the qualifying objects of a particular type (class) based on the filter condition
http://localhost:80/gilhari/v1/Employee?filter=id=39 Bulk-update only the top level objects if deep=false otherwise update related (linked) objects also (default value for 'deep' is true)
Delete one or more objects; One or more JSON objects that need to be deleted are specified using the "entity" tag in the Body of the request.
http://localhost:80/gilhari/v1/Employee/deleteEntity Delete only the top level objects if deep=false otherwise delete related (linked) objects also (default value for 'deep' is true)
Bulk-delete all objects of a particular type (class)
http://localhost:80/gilhari/v1/Employee

filter

Copyright (c) 2020 Software Tree, LLC

deep

Bulk-delete only the qualifying objects of a particular type (class) based on the filter condition
http://localhost:80/gilhari/v1/Employee?filter=exempt=true
Delete only the top level objects if deep=false otherwise delete related (linked) objects also (default value for 'deep' is true)

Preparing to load PDF file. please wait...

0 of 0
100%
Gilhari RESTful JSON Persistence Service APIs