Insert a json record in JsonPowerDB

edited February 23 in How 2
To insert a single json record, JsonPowerDB provide 'PUT' command, request format for insert is as follows:


PUT request format from client:

            "dbName": "MyDataBase",
            "cmd" : "PUT",
            "rel" : "Employee",
            "templateStr": {
            "jsonStr": {
                            "empName":"ARPIT TODEWALE",
                            "empDsg":"TECHNICAL HEAD"

Post above json request using HTTP post request method on following information:

            Url : ‘http://serverdomain:5577/api/iml
            Method: ‘POST’
            Content-Type: ‘application/json’

In above PUT request format only empID will be indexed as it is provided in templateStr and the data inside the jsonStr will be stored   in jsonPowerDB. For more information about request variables click here. if the data will successfully stored in JsonPowerDB then server will return following json response.

 PUT response format from server:

                "message":"RELATION CREATED, TEMPLATE CREATED,
                                     DATA INSERTED"

For Inserting multiple records at a time in JsonPowerDB, Follow this link.

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!