NOTE - The JsonPowerDB API port has been changed to 5577

Old Request: http://serverdomain:4567/...
New Request: http://serverdomain:5577/...

How to find json objects and their record numbers of desired value from JsonPowerDB?

edited August 2017 in How 2

JsonPowerDB provides FIND_RECORD command to get the list of record numbers and corresponding json object where the desired value is exists. Following shows how to make request of FIND_RECORD for JsonPowerDB server.

Url : ‘http://serverdomain:4567/api/irl
Method: ‘POST’
Content-Type: ‘application/json’

FIND_RECORD Request:

{
   "token":"401400726|-363956312424328770|401400726",
   "cmd" : "FIND_RECORD",
   "dbName": "MyDataBase",
   "rel" : "Employee",
   "jsonStr": {
                 "empID":"101"
                    }
 }

FIND_RECORD Response: This command returns response in json format contains json array of json objects that contains record number and json record inside it.

{
 "dataArray": [
           {  
             "record": {  "empID":"101",
                               "empSex":"M",
                               "empDed":0.0, 
                               "empName":"ARPIT TODEWALE",
                               "empNet":0.0,
                               "empBasic":25000,
                               "empAllowance":0.0,
                               "empDsg":"TECHNICAL HEAD"         
                           },

            "record number":1
          }
         ],
"message": "Success",
"status":200 }


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!