Close Menu Login2XplorE Home Docs Tutorial Contact
J PDB   

JPDB API Command Reference


Language Syntax

< . . . > - User specified value.
<< . . . >> - Optional parameter, may take default value if not used.

# Connection Token - Connecting to JPDB API.

  • Connection-token is used to interact with JsonPowerDB, it must be included in every request of jsonPowerDB for security purpose.

# How to get the 'connection-token' from JsonPowerDB :

  • Login to JPDB API Dashboard .
  • Click on Tools option on left navigation .
  • Select Tokens panel and then select 'connection-token' option from dropdown ,
  • Copy the 'connection-token' from the Token table .
  • And if there is no 'connection-token' in the token table or if you want to generate a new 'connection-token', click on the Generate Connetion_Token button as It will generate a new-connection token .
  • Copy the newly generated 'connection-token' from token table .

# IML (JPDB Index Manipulation Language) - To insert, update and delete Json data.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /api/iml
dbName : Optional, if omitted will take the default database-name.
rel : Optional, if omitted will take the default relation-name.
templateStr : Optional, can be used to create specified indexes else the first row of data (jsonStr) will decide the number columns indexed.
colsAutoIndex : Optional, can be used to automatically index all the new columns (default true).

                                            
{
    "token": <"connection-token">,
    "cmd": "PUT",
    <<"dbName": <"database-name">,>>
    <<"rel": <"relation-name">,>>
    <<"colsAutoIndex": <boolean-value>,>>
    <<"templateStr": <jsonTemplateStr>,>>
    "jsonStr": <jsonDataStr>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "PUT",
    "dbName": "Company",
    "rel": "Employee",
    "colsAutoIndex": true,
    "templateStr": {
        "empID": "PHP101"
    },
    "jsonStr": {
        "empID": "PHP101",
        "empDed": 523.0,
        "empName": "Arpit Todewale",       
        "empBasic": 25000,
        "empAllowance": 659.0,
        "empDsg": "TECHNICAL HEAD"
    }
}                                      
                                                
                                            
                                                
{
    "data": "",
    "message": "RELATION CREATED, TEMPLATE CREATED, DATA INSERTED, Total 1 rows are inserted, Added 5 columns as New Index Columns",
    "status": 200
}                                                  
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or exceeding limits.
dbName : Optional, if omitted will take the default database-name.
rel : Optional, if omitted will take the default relation-name.
templateStr : Optional, can be used to create specified indexes else the first row of data (jsonStr) will decide the number columns indexed.
colsAutoIndex : Optional, can be used to automatically index all the new columns (default true).

                                            
{
    "token": <"connection-token">,
    "cmd": "PUTALL",
    <<"dbName": <"database-name">,>>
    <<"rel": <"relation-name">,>>
    <<"colsAutoIndex": <boolean-value>,>>
    <<"templateStr": <jsonTemplateStr>,>>
    "jsonStr": [jsonDataArrayStr]
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "PUTALL",
    "dbName": "Company",
    "rel": "Employee",
    "colsAutoIndex": true,
    "templateStr": {},
    "jsonStr": [
        {
            "empID": "JAVA102", "empDed": 500.0, "empName": "Sumit Todewale", "empBasic": 25000,
            "empAllowance": 669.0, "empDsg": "TECHNICAL HEAD", "deptID": "JAVA"
        },
        {
            "empID": "PHP102", "empDed": 562.0, "empName": "Sanjay", "empBasic": 25000, 
            "empAllowance": 632.0, "empDsg": "PHP DEVELOPER LEAD", "deptID": "PHP"
        }
    ]
}                                
                                                
                                            
                                                
{
    "data": "",
    "message": "DATA INSERTED, Total 2 rows are inserted, Added 1 columns as New Index Columns",
    "status": 200
    }                                                  
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or exceeding limits.
                                            
{
    "token": <"connection-token">,
    "cmd": "UPDATE",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "jsonStr": {
        <"recordNo">: {
            <"ColumnName": "NewJsonValue">|<"New-ColumnName": "New-Column-Value">
        }
    }
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "UPDATE",
    "dbName": "Company",
    "rel": "Employee",
    "jsonStr": {
        "3": {
            "empName": "Sanjay Verma",
            "empBasic": 25000,
            "empDeptName": "PHP"
        }
    }
}                                  
                                                
                                            
                                                
{
    "data": {
        "3": {
            "empName": "Sanjay",
            "empBasic": 25000
        },
        "NewIndexColumnCreated": 1,
        "NewNonIndexColumnCreated": 0
    },
    "message": "Success",
    "status": 200
}
                                             
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
                                            
{
    "token": <"connection-token">,
    "cmd": "REMOVE",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "record": <record_number>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "REMOVE",
    "dbName": "Company",
    "rel": "Employee",
    "record": 1
}                                
                                                
                                            
                                                
{
    "data": {
        "empID": "PHP101", "empDed": 523.0, "empName": "Arpit Todewale", "empBasic": 25000,
        "empAllowance": 659.0, "empDsg": "TECHNICAL HEAD"
    },
    "message": "Success",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
                                            
<form id=<"your-form-id"> method="post"
    data-connection-token=<"your-connection-token">
    data-db-name=<"your-database-name"> 
    data-table-name=<"your-relation-name">
    data-success-msg=<<"your-success-msg">>
    data-error-msg=<<"your-error-msg">>
    data-response-div-id=<<"your-response-div-id">>
onsubmit="return insertFormData2JPDB(this.id);">
                                                
                                            
                                            
<form id="RegisterForm" method="post"
    data-connection-token="401400726|-363956312424328770|401400726"
    data-db-name="MyDatabase" 
    data-table-name="MyUsers"
    data-response-div-id="responseMsg"
    data-success-msg="Thanks for Registering"
    data-error-msg="Data NOT submited."
onsubmit="return insertFormData2JPDB(this.id);">                              
                                                
                                            

# IRL (JPDB Index Retrieval Language) - To retrieve Json data.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /api/irl
                                                
{
    "token": <"connection-token">, 
    "cmd": "GET",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "jsonStr": {
        <"ColumnName":"JsonValue">
    }
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745244281054|2134771272",
    "cmd": "GET",
    "dbName": "Company",
    "rel": "Employee",
    "jsonStr":{
        "empName": "Arpit Todewal"
    }
}  
                                                
                                            
                                                
{
    "data": {
                "empID": "PHP101","empDed": 523.0, "empName": "Arpit Todewal",
                "empBasic": 25000, "empAllowance": 659.0, "empDsg": "TECHNICAL HEAD"
    },
    "message": "DATA_HAS_BEEN_RETRIEVED_FROM_PI",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or data not found.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETALL",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    <<"pageNo":<pageNumber>,>>
    <<"pageSize":<pageSize> >>
        
} 
                                                
                                            
Default page size : 100
Default page Number : 1
                                                
{
    "token": "1827624250|-8267918816058036443|1827624273",
    "cmd": "GETALL",
    "dbName": "Company",
    "rel": "Employee",
    "pageNo": 2,
    "pageSize": 2
} 
                                                
                                            
                                                
{
    "data":
            {
                "file_status": "OK", "total_records": 8,
                "json_records": [
                    {
                        "rec_no": 3,
                        "record": {
                            "empID": "JAVA102", "empDed": 500.0, "empName": "Sumit Todewale", "empBasic": 25000, "empAllowance": 669.0, "empDsg": "TECHNICAL HEAD", "deptID": "PHP"}
                    },
                    {
                        "rec_no": 4,
                        "record": {
                            "empID": "UI104", "empDed": 560.0, "empName": "Deepak Pal", "empBasic": 15000, "empAllowance": 600.0, "empDsg": "UI DEVELOPER", "deptID": "UI"}
                    }
                ],
                "total_pages": 3,
                "current_page": 2
            }, "message": "DATA_HAS_BEEN_RETRIEVED_FROM_PI", "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or relation does not exist.
                                                
{
    "token": <"connection-token">,   
    "cmd": "FIND_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "jsonStr": {
        <"ColumnName":"JsonValue">
    }
}
                                                
                                            
                                                
{
    "token": "-135547047|-4027522630245206345|-135546978",
    "cmd": "FIND_RECORD",
    "dbName": "Company",
    "rel": "Employee",
    "jsonStr": {
        "empID": "JAVA102"
    }
} 
                                                
                                            
                                                
{
    "data": [
        {
            "record": {
                "empID": "JAVA102", "empDed": 500.0, "empName": "Sumit Todewale", "empBasic": 25000,
                "empAllowance": 669.0, "empDsg": "TECHNICAL HEAD", "deptID": "JAVA"
            },
            "record number": 3
        }
    ],
    "message": "",
    "status": 200
}                                                   
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or data not found.
                                                
{
    "token": <"connection-token">,   
    "cmd": "GET_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "record": <record_number>
}
                                                
                                            
                                                
{
    "token": "401400726|-363956312424328770|401400726",   
    "cmd": "GET_RECORD",
    "dbName": "Company",
    "rel": "Employee",
    "record": 1
}
                                                
                                            
                                                
{
    "data":
            {
                "empID": "PHP101","empDed": 523.0, "empName": "Arpit Todewal",
                "empBasic": 25000, "empAllowance": 659.0, "empDsg": "TECHNICAL HEAD"
            },
    "message": "Success",
    "status": 200
}                                                   
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
                                                
{
    "token": <"connection-token">, 
    "cmd": "FIRST_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">
} 
                                                
                                            
                                                
{
    "token": "-135547047|-4027522630184338431|-135546906",
    "cmd": "FIRST_RECORD",
    "dbName": "Company",
    "rel": "Employee"
} 
                                                
                                            
                                                
{
    "data": {
        "record_number": 1,
        "record": {
                "empID": "PHP101","empDed": 523.0, "empName": "Arpit Todewal",
                "empBasic": 25000, "empAllowance": 659.0, "empDsg": "TECHNICAL HEAD"
            },
    },
    "message": "OK",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or BOF.
                                                
{
    "token": <"connection-token">, 
    "cmd": "LAST_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745254437337|2134771191",
    "cmd": "LAST_RECORD",
    "dbName": "Company",
    "rel": "Employee"
} 
                                                
                                            
                                                
{
    "data": {
        "record_number": 5,
        "record":
                {
                    "empID": "JAVA105", "empDed": 562.0, "empName": "Amit Sharma", "empBasic": 40000,
                    "empAllowance": 789.0, "empDsg": "CEO", "deptID": "JAVA"
                }
    },
    "message": "OK",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or EOF.
                                                
{
    "token": <"connection-token">, 
    "cmd": "NEXT_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "record": <record_number>
} 
                                                
                                            
                                                
{
    "token": "-135547047|-4027522630245206345|-135546978",
    "cmd": "NEXT_RECORD",
    "dbName": "Company",
    "rel": "Employee",
    "record": 3
} 
                                                
                                            
                                                
{
    "data":
            {
                "record_number": 4,
                "record": {
                    "empID": "UI104", "empDed": 560.0, "empName": "Deepak Pal", "empBasic": 15000,
                    "empAllowance":600.0, "empDsg": "UI DEVELOPER", "deptID": "UI"
                }
            },
    "message": "OK",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
                                                
{
    "token": <"connection-token">, 
    "cmd": "PREV_RECORD",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "record": <record_number>
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745254386678|2134771170",
    "cmd": "PREV_RECORD",
    "dbName": "Company",
    "rel": "Employee",
    "record": 3
}  
                                                
                                            
                                                
{
    "data": {
        "record_number": 2,
        "record": {
            "empID": "PHP102", "empDed": 562.0, "empName": "Sanjay Verma", "empBasic": 25000, 
            "empAllowance": 632.0, "empDsg": "PHP DEVELOPER LEAD", "deptID": "PHP"
        }
    },
    "message": "OK",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETALLDB"
}
                                                
                                            
                                                
{
    "token": "2134770734|1905622745244281054|2134771272",
    "cmd": "GETALLDB"
}  
                                                
                                            
                                                
{
    "data": [
        "Company"
    ],
    "message": "Success",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETALLREL",
    "dbName": <"database-name">
}
                                                
                                            
                                                
{
    "token": "-251949444|-7177940018675183934|-251949541",
    "cmd": "GETALLREL",
    "dbName": "Company"
}  
                                                
                                            
                                                
{
    "data": [
        "Employee"
    ],
    "message": "Success",
    "status": 200
}                                            
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or relation does not exist.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETINDEXEDCOL",
    "dbName": <"database-name">,
    "rel": <"relation-name">
}
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408421709|2134771389",
    "cmd": "GETINDEXEDCOL",
    "dbName": "databaseName",
    "rel": "relationName"
} 
                                                
                                            
                                                
{
    "data": [
        {"colName": "empAllowance", "colType": "Double" },
        {"colName": "empBasic", "colType": "Long" },
        {"colName": "empDed", "colType": "Double" },
        {"colName": "empDsg", "colType": "String" },
        {"colName": "empID", "colType": "String"  },
        {"colName": "empName", "colType": "String"},
        {"colName": "deptID", "colType": "String"},
    ],
    "message": "Success",
    "status": 200
}                                          
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETNONINDEXEDCOL",
    "dbName": <"database-name">,
    "rel": <"relation-name">
}
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408421709|2134771389",
    "cmd": "GETNONINDEXEDCOL",
    "dbName": "databaseName",
    "rel": "relationName"
} 
                                                
                                            
                                                
{
    "data": [
    ],
    "message": "Success",
    "status": 200
}                                    
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GETALLCOL",
    "dbName": <"database-name">,
    "rel": <"relation-name">
}
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408421709|2134771389",
    "cmd": "GETALLCOL",
    "dbName": "databaseName",
    "rel": "relationName"
}

 
                                                
                                            
                                                
{
    "data": [
        {"colName": "empAllowance", "colType": "Double" },
        {"colName": "empBasic", "colType": "Long" },
        {"colName": "empDed", "colType": "Double" },
        {"colName": "empDsg", "colType": "String" },
        {"colName": "empID", "colType": "String"  },
        {"colName": "empName", "colType": "String"},
        {"colName": "deptID", "colType": "String"},
    ],
    "message": "Success",
    "status": 200
}                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                                
{
    "token": <"connection-token">, 
    "cmd": "IS_COLUMN_INDEXED",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "colName": <"columnName">
}
                                                
                                            
                                                
{
    "token": "-1167378241|1086969150968262306|-1167383633",
    "cmd": "IS_COLUMN_INDEXED",
    "dbName": "databaseName",
    "rel": "relationName",
    "colName": "empAllowance"
}



 
                                                
                                            
                                                
{
    "data": "COLUMN IS INDEXED",
    "message": "Success",
    "status": 200
}                               
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or COLUMN_NOT_INDEXED.
                                                
{
    "token": <"connection-token">, 
    "cmd": "IS_COLUMN_EXIST",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "colName": <"columnName">
}
                                                
                                            
                                                
{
    "token": "-1167378241|1086969150968262306|-1167383633",
    "cmd": "IS_COLUMN_EXIST",
    "dbName": "databaseName",
    "rel": "relationName",
    "colName": "empBasic"
}

 
                                                
                                            
                                                
{
    "data": "COLUMN EXIST",
    "message": "Success",
    "status": 200
}                              
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or COLUMN DOES NOT EXIST.

# IDL (JPDB Index Definition Language) - To add index column and remove column / relation / database.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /api/idl
                                                
{
    "token": <"connection-token">, 
    "cmd": "ADD_INDEX",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "jsonStr": {
        <"ColumnName":SampleData>
    }
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408438787|2134771388",
    "cmd": "ADD_INDEX",
    "dbName": "Company",
    "rel": "Employee",
    "jsonStr": {
        "empName": "Arpit"
    }
}
                                                
                                            
                                                
{
    "data": {
        "empName": "Arpit"
    },
    "message": "COLUMN ADDED TO PI",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or column already indexed / column does not exist.
                                                
{
    "token": <"connection-token">, 
    "cmd": "REMOVE_INDEX",
    "dbName": <"database-name">,
    "rel": <"relation-name">,
    "jsonStr": {
        <"ColumnName":SampleData>
    }
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408438787|2134771388",
    "cmd": "REMOVE_INDEX",
    "dbName": "Company",
    "rel": "Employee",
    "jsonStr": {
        "empName": "Arpit"
    }
}
                                                
                                            
                                                
{
    "data": {
        "empName": "Arpit"
    },
    "message": "COLUMN REMOVED FROM PI",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or column does not exist.
                                                
{
    "token": <"connection-token">, 
    "cmd": "REMOVE_RELATION",
    "dbName": <"database-name">,
    "rel": <"relation-name">
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408438787|2134771388",
    "cmd": "REMOVE_RELATION",
    "dbName": "Company",
    "rel": "Employee"
}
                                                
                                            
                                                
{
    "data": "",
    "message": "RELATION REMOVED FROM PI",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or relation / database does not exist.
                                                
{
    "token": <"connection-token">, 
    "cmd": "REMOVE_DB",
    "dbName": <"database-name">
} 
                                                
                                            
                                                
{
    "token": "2134770734|1905622745408438787|2134771388",
    "cmd": "REMOVE_DB",
    "dbName": "Company"
}
                                                
                                            
                                                
{
    "data": "Comapny",
    "message": "DATABASE REMOVED",
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or database does not exist.

# ISL (JPDB Index Scripting Language) - To execute NoSQL script.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /api/isl
                                                
{
    "token": <"connection-token">, 
    "cmd": "EXECUTE_SCRIPT",
    "jsonStr":{
        "scriptName": <"script-name">,
        "scriptParams": <<{
            "param-name": "param-value"
        }>>
    }
} 
                                                
                                            
                                                
{
    "token": "-1167378244|1086969151783791515|-1167390189",
    "cmd": "EXECUTE_SCRIPT",
    "jsonStr": {
        "scriptName": "emp_with_mngr_lead_php_dept",
        "scriptParams": {
            "depna": "00P"
        }
    }
}
                                                
                                            
                                                
{
    "data": [
        {
            "record": {
                "Employee Name": "MONALI LALWANI", "Manager Name": "SANJAY VERMA"
            }, "recordNo": 0
        },
        {
            "record": {
                "Employee Name": "SANJAY VERMA", "Manager Name": "ARPIT TODEWALE"
            }, "recordNo": 1
        },
        {
            "record": {
                "Employee Name": "AKSHITA SINGH", "Manager Name": "SANJAY VERMA"
            }, "recordNo": 2
        },
        {
            "record": {
                "Employee Name": "SNEHASHISH DAS", "Manager Name": "SANJAY VERMA"
            }, "recordNo": 3
        }
    ],
    "queryTime": 1,
    "message": "",
    "status": 200
}
                                                
                                            
200 for Success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                                
{
    "token": <"connection-token">, 
    "cmd": "REMOVE_SCRIPT",
    "jsonStr":{
        "scriptName": <"scriptName">
    }
} 
                                                
                                            
                                                
{
    "token": "-1167378244|1086969151783791515|-1167390189",
    "cmd": "REMOVE_SCRIPT",
    "jsonStr": {
        "scriptName": "display_active_project_name"
    }
}
                                                
                                            
                                                
{
    "data": "display_active_project_name",
    "message": "Script Removed Successfully",
    "status": 200
}
                                                
                                            
200 for Success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or Script does not exist.
                                                
{
    "token": <"connection-token">, 
    "cmd": "GET_SCRIPT_NAMES"
} 
                                                
                                            
                                                
{
    "token": "-1167378244|1086969151783791515|-1167390189",
    "cmd": "GET_SCRIPT_NAMES"
}
                                                
                                            
                                                
{
    "data": [
        "male_in_java_dept",
        "emp_with_mngr_lead_php_dept",
        "list_all_emp_in_acc_op_dept"
    ],
    "message": "script name successfully retrievd",
    "status": 200
}
                                                
                                            
200 for Success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.

# Serverless API - To send email, getting unique id and for maintaining session.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /serverless/send_email
                                                
{
    "token": <"connection-token">, 
    "jsonStr":{
        "emailTo": "email-id",
        <<"emailCc": "email-id",>>
        <<"emailBcc": "email-id",>>
        "emailSubject": <"email-subject",>
        "emailContent": <"email-content">
    }
} 
                                                
                                            
                                                
{
    "token": "-172115678|-4429696675080146005|-172115654",
    "jsonStr": {
        "emailTo": "email-id",
        "emailCc": "email-id",
        "emailBcc": "email-id",
        "emailSubject": "Happy Diwali !!!!",
        "emailContent": "Wishing you a very Happy Diwali. "
    }

} 
                                                
                                            
                                                
{
    "data": "",
    "message": "Email sent successfully",
    "status": 200
}
                                                
                                            
200 for Email sent successfully
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or Failure of sending email.
End-point url : /serverless/get_unique_id
                                                
{
    "data": "",
    "message": "1529045397193",
    "status": 200
}
                                                
                                            
End-point url : /serverless/get_new_session
seedValue : Random seed value to generate session token.
                                                
{
    "token": <"connection-token">, 
    "jsonStr":{
        "seedValue": <seedNumber>
    }
}
                                                
                                            
                                                
{
    "token": "-1167378241|1086969150983439281|-1167383890",
    "jsonStr": {
        "seedValue": 1
    }
}
                                                
                                            
                                                
{
    "data": {
        "sessionToken": "-394202423|-5366185932241622387|-394202432"
    },
    "message": "sessionToken created.",
    "status": 200
}
                                                
                                            
200 for session token created
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or session token cannot be created.
End-point url : /serverless/validate_session
                                                
{
    "token": <"connection-token">, 
    "jsonStr":{
        "sessionToken": <"session-token">
    }
}
                                                
                                            
                                                
{
    "token": "-1167378241|1086969150983439281|-1167383890",
    "jsonStr": {
        "sessionToken": "-394202423|-5366185932241622387|-394202432"
    }
}

                                                
                                            
                                                
{
    "data": "",
    "message": "sessionToken valid.",
    "status": 200
}
                                                
                                            
200 for session token valid
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or session token does not exist.
End-point url : /serverless/remove_session
                                                
{
    "token": <"connection-token">, 
    "jsonStr":{
        "sessionToken": <"session-token">
    }
}
                                                
                                            
                                                
{
    "token": "-1167378241|1086969150983439281|-1167383890",
    "jsonStr": {
        "sessionToken": "-394202423|-5366185932241622387|-394202432"
    }
}

                                                
                                            
                                                
{
    "data": "",
    "message": "session removed.",
    "status": 200
}
                                                
                                            
200 for session not present or session removed
401 for error, error due to Invalid Token.

JsonPower SQL


# JsonPower Query - To retrieve data from database.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /irl
                                            
{
    "token": <"connection-token">,
    "select": {
        <<"rows": "<"ALL"|"DISTINCT"|"FIRST"|"LAST">,>>
        "cols": < "*" > | <[
            {
                "alias1": "col1" | [ relate-expr1 ]
            }
            <<,{
                "alias2": "col2" | [ relate-expr2 ]
            }>>...
        ]>
    },
    "from": <"main-relation">,
    <<"where": [[condition1], "AND", "OR", [condition2]]>>,
    <<"limit": [row - count, offset]>>
}
                                                
                                            
from : Relation name from which records will be retrieved. Relation name is in the format : db_name | rel_name.
cols : Columns which you wants to retrieve .
  • If column is belongs to the same relation which is given in the from then, Columns name is in the format : { "alias_name" : "column-name" } .
  • Or You can provide column name like this : { "alias_name" : "db_name | main-rel_name . col_name" } .
relate-expr : Relate Expression Will retrieve column from another relation. Relate expression is an array which is in the format:
  • { "alias_name" : [ “db_name | rel_name . col_name2Retrieve” ,
                              "db_name | main-relation . relate-coln" ,
                              "db_name | rel_name . col_name2Relate" ]
    }
  • At index 0, Column you want to retrieve from different relation, must be in the format : db_name | rel_name . col_name .
  • At index 1, Index Column must be from same relation as given in from for comparing its value with another column value, It is in the format : "db_name | main-relation . relate-coln" , or you can only provide : column-name but It is only applicable at index 1.
  • At index 2, Index Column must from the same relation as column present at index 0 in this array, for relating it's value with the column value present at index1 and It must be in the format : db_name | rel_name . col_name .
where : Where will allow you to retrieve records based on the condition you provide .
  • Condition
    [ “col-name1” | {“val” : value1} ,
    "<" | "<=" | "==" | ">=" | ">" | "!=" ,
    "col-name2" | {“val” : value2} ]
  • At index 0, column-name must be from same relation as given in from whose value is to be compared with value / column. It is in the format : db_name|main-rel_name.col_name , or you can provide value in the JSONObject, you want to compare .
  • At index 1, It must be a operator to perform comparison .
  • At index 2, value you want to compare with column present at index 0 and value must be given in the JSONObject , or you can provide column-name which must be from same relation as given in from as its value is to be compared with column / value present at index 0 . It is in the format : db_name|main-rel_name.col_name .
limit : Limit will allows you to retrieve only certain number of records .
  • row-count : row-count is the number of records you want to retrieve from relation .
  • offset : offset is the value from where retrieval of records is start . offset will start from 0.

                                            
// Query : List all active projects with their manager names.
{
    "token": "90936382|-31948869760261870|90936262",
    "select": {
        "cols": [
            {
                "prjName": "Company|Projects.prj_name"
            },
            {
                "prj_id": "prj_id"
            },
            {
                "emp_name": [
                    "Company|Employee.emp_name",
                    "Company|Projects.prj_mgr_emp_id",
                    "Company|Employee.emp_id"
                ]
            }
        ]
    },
    "from": "Company|Projects",
    "where": [
        "Company|Projects.is_prj_active",
        "==",
        {
            "value": "true"
        }
    ],
    "limit": [3, 1]
}
                                                
                                            
                                                
{
    "data": [{
            "Columns": ["Rec_No", "prjName", "prj_id", "emp_name"]
        }, {
            "Records": [[2, "Hotel management system", "2HT", ["SANJAY VERMA"]],
                [3, "Hospital management system", "3HP", ["RAHUL GUPTA"]],
                [4, "Banking management system", "4B", ["SANJAY VERMA"]]]
        }],
    "message": "Success",
    "status": 200
}                                               
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.

NoSQL Reference


NoSQL is a collection of java methods. Basic knowledge of java language is required to write NoSQL scripts.

userQueryObj - Object of class QueryResultSet, used to return records to client. Must be passed methods as 'this' if specified.
finalQueryResult - Object of class QueryResultSet, used to display the resultant json records to the client.


public static ArrayList get(
        String dbName,
        String relName,
        String columnName,
        Object key,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException

                                            
   
    This method return ArrayList of record-numbers of json object having provided key if exists.
    
    @param dbName
    @param relName
    @param columnName
    @param key
    @param userQueryObj
    @throws java.lang.NoSuchFieldException  

                                            

public static Record get(
        String dbName,
        String relName,
        int recNo,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException 

                                            
  
    Returns only one row of type Record for the given recNo.
     
    @param dbName
    @param relName
    @param recNo
    @param userQueryObj
    @throws NoSuchFieldException         

                                            

public static ArrayList getAll(
        String dbName,
        String relName,
        String columnName,
        Object startKey,
        Object endKey,
        int noOfKeys,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException 

                                            
 
    This method returns ArrayList of Integer type that contains record-number of json Object having key in provided range.
    
    It will seek in indexed column and if column is not indexed then it searches in file for non-indexed column.
    
    @param dbName
    @param relName
    @param columnName
    @param startKey
    @param endKey
    @param noOfKeys
    @param userQueryObj
    @throws java.lang.NoSuchFieldException    

                                            

public static ArrayList getAllMatching(
        String dbName,
        String relName,
        String colName,
        String matchStr,
        boolean igCase,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException

                                            
 
    Finds a matching string anywhere in given colName.
      
    @param dbName
    @param relName
    @param colName
    @param matchStr
    @param igCase
    @param userQueryObj
    @throws NoSuchFieldException      

                                            

public static int getFileSize(
        String dbName,
        String relName,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException

                                            

    Returns number of rows (including deleted rows) in the given relation.
      
    @param dbName
    @param relName
    @param userQueryObj
    @throws NoSuchFieldException      

                                            

public static QueryResultSet project(
        String dbName,
        String relName,
        ArrayList recordNumbers,
        String[] selectColName,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException

                                            
  
    This method return ArrayList of record-numbers of json object having provided key if exists.
     
    @param dbName
    @param relName
    @param columnName
    @param key
    @param userQueryObj
    @throws java.lang.NoSuchFieldException

                                            

public static ArrayList selectAll(
        String dbName,
        String relName,
        int fromRecNo,
        int toRecNo,
        JsonDBExecuteQuery userQueryObj)
        throws NoSuchFieldException

                                            
  
    This method return an ArrayList of Integer containing fromRecNo to toRecNo numbers of a relation.
    It iterates through file sequentially from start to end.
    It returns only those record-number whose json object is not null.
     
    @param dbName
    @param relName
    @param fromRecNo
    @param toRecNo
    @param userQueryObj
    @throws java.lang.NoSuchFieldException

                                            

public static int compare(
        Object obj1,
        Object obj2) 

                                            
  
    The preference to compare the objects are Double, Long, String, Boolean.
    The of obj1 and obj2 must be same.
    To have different preferences one can individually call the overloaded compareIgnoreType methods as their requirements.
     
    @param obj1
    @param obj2

                                            

public static int compareIgnoreType(
        Object obj1,
        Object obj2)        

                                            
 
    The preference to compareIgnoreType the objects are Double, Long, String, Boolean.
    To have different preferences one can individually call the overloaded compareIgnoreType methods as their requirements.
     
    @param obj1
    @param obj2

                                            

public static boolean equals(
        Object obj1,
        Object obj2)
            

                                            
  
    Compare for the equality of two objects identical to equals() method except of both objects are null this method will return 
    true and if any one object is null then this method will return false.
      
    @param obj1
    @param obj2

                                            

public static boolean equalsIgnoreType(
        Object obj1,
        Object obj2)
            

                                            
  
    Compare for the equality of two objects of different types.
    if both objects are null this method will return true and if any one object is null this method will return false.
      
    If obj1 is of type Double the obj2 gets converted to Double and compared.
    If obj1 is Long the obj2 gets converted to Long and compared.
    If obj1 is String the obj2 gets converted to String and compared.
    If obj1 is Boolean the obj2 gets converted to Boolean and compared.
      
    @param obj1
    @param obj2

                                            

public static boolean exists(
        Object obj, 
        Object inObj)
            

                                            
  
    Check for the existence of one objects into another.
    if both objects are null this method will return true and if any one object is null this method will return false.
    
    @param obj
    @param inObj 

                                            

public void addRecord(Record rec)         

                                            

    It will add the given Record in the query result.

                                            

public JSONObject getJsonObject()            

                                            

    It will return the json row of the calling record.

                                            

public String getResponseMessage()

                                            

    It will return the response message  of the final query.

                                            

public int getStatus()

                                            

    It will return the status of the final query.

                                            

public long getQueryTime()

                                            

    It will return the execution time of the query.

                                            

public void setResponseMessage(String responseMessage)

                                            

    This method set the response message of the query.

                                            

public void setStatus(int status)

                                            

    This method set the status of the query.

                                            

JPDB kvp Api Command Reference


# Hash Map - To insert, update and delete hashmap data.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /kvp/api/hm
                                            
{
    "token": <"connection-token">,
    "cmd": "hmPut",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">,
    "val": <"value">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmput",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101",
    "val": "Arpit Todewale"
}                                          
                                                
                                            
                                                
{
    "status": 200
}                                                    
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmGet",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmGet",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101"
}                                    
                                                
                                            
                                                
{
    "status": 200,
    "data": "Arpit Todewale"
}                                                    
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmExists",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmExists",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101"
}                                   
                                                
                                            
                                                
{
    "status": 200,
    "data": "T"
}                                           
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmDel",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmDel",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101"
}                                 
                                                
                                            
                                                
{
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or invalid record number.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmClear",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmClear",
    "ws": "Company",
    "ds": "Employess"
}                                  
                                                
                                            
                                                
{
    "status": 200
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "removeHm",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "removeHm",
    "ws": "Company",
    "ds": "Employess"
}                                  
                                                
                                            
                                                
{
    "status": 200
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
exp : Expiry Time : This parameter is for storing the expiry time in milli seconds of a key, after the expiry time of the given key is finished the data will not be accessible .

                                            
{
    "token": <"connection-token">,
    "cmd": "hmPutX",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">,
    "val": <"value">,
    "exp": <keyExpiryTime>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmPutX",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101",
    "val": "Arpit Todewale",
    "exp": 2000
}                                  
                                                
                                            
                                                
{
    "status": 200
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmGetX",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">,
    "exp": <keyExpiryTime>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmGetX",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101",
    "exp": 2000
}                                  
                                                
                                            
                                                
{
    "status": 200,
    "data": "Arpit Todewale" 
}                                           
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmExistsX",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">,
    "exp": <keyExpiryTime>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmExistsX",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101",
    "exp": 2000
}                                  
                                                
                                            
                                                
{
    "status": 200,
    "data": "T" 
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmX",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">,
    "exp": <keyExpiryTime>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmX",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101",
    "exp": 2000
}                                  
                                                
                                            
                                                
{
    "status": 200
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "hmNx",
    <<"ws": <"workspace-name">,>>
    "ds": <"hashmap-name">,
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmNx",
    "ws": "Company",
    "ds": "Employess",
    "key": "PHP101"
}                                  
                                                
                                            
                                                
{
    "status": 200
}                                            
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to Collection or data Structure not present.
1002 for error, error can be due to key not present.

# String - To insert, get and delete String data.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /kvp/api/str
                                            
{
    "token": <"connection-token">,
    "cmd": "dfPut",
    <<"ws": <"workspace-name">,>>
    "key": <"key">,
    "val": <"value">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "dfPut",
    "ws": "Company",
    "key": "PHP101",
    "val": "Arpit Todewale"
}                                      
                                                
                                            
                                                
{
    "status": 200
}                                                    
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                            
{
    "token": <"connection-token">,
    "cmd": "dfGet",
    <<"ws": <"workspace-name">,>>
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "dfGet",
    "ws": "Company",
    "key": "PHP101"
}                                
                                                
                                            
                                                
{
    "status": 200,
    "data": "Arpit Todewale"
}                                                    
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "dfExists",
    <<"ws": <"workspace-name">,>>
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "dfExists",
    "ws": "Company",
    "key": "PHP101"
}                                  
                                                
                                            
                                                
{
    "status": 200,
    "data": "T"
}
                                             
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax .
1000 for error, error can be due to workspace not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "dfDel",
    <<"ws": <"workspace-name">,>>
    "key": <"key">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "dfDel",
    "ws": "Company",
    "key": "PHP101"
}                                
                                                
                                            
                                                
{
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1002 for error, error can be due to key not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "dfClear",
    <<"ws": <"workspace-name"> >>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "dfClear",
    "ws": "Company"
}                                
                                                
                                            
                                                
{
    "status": 200
}
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
1002 for error, error can be due to key not present.

# Bulk - To execute bulk request.

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /kvp/api/bulk
ws : main-workspace : Optional, if omitted will take the current workspace or the workspace from the requests which are present in the jsonStr array .
ds : main-data-structure : Optional, if omitted will take the data structure from the requests which are present in the jsonStr array but then each request must have a data structure name based on the operation .
cmd : main-command : Optional, if omitted will take the command from the requests which are present in the jsonStr array but then each request must have a command based on the operation .
jsonStr : It is an array which will have any CRUD request of any data structure or of any workspace in the json object format .

                                            
{
    "token": <"connection-token">,
    <<"cmd": <"main-cmd">,>>
    <<"ws": <"main-workspace-name">,>>
    <<"ds": <"main-ds-name">,>>
    "jsonStr": [
        {
            "ws": "ws-name",
            "key": "key",
            "val": "val"
        },
        {
            "ds": "ds-name",
            "cmd": "cmd-name",
            "ws": "ws-name",
            "key": "key",
            "val": "val"
        },
        {
            "ds": "ds-name",
            "key": "key",
            "val": "val"
        },...
    ]
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "hmPut",
    "ws": "Company",
    "ds": "Employee",
    "jsonStr": [
        {
            "ds": "DepartmentHead",
            "key": "PHP",
            "val": "Arpit Todewal"
        },
        {
            "ds": "DepartmentHead",
            "cmd": "hmGet",
            "key": "PHP"
        },
        {
            "key": "E01",
            "val": "SANJAY VERMA"
        },
        {
            "key": "E02",
            "val": "SALONI PATNI"
        },
        {
            "key": "E03",
            "val": "DEEPAK PAL"
        },
        {
            "key": "E04",
            "val": "AMIT SHARMA"
        },
        {
            "key": "E05",
            "val": "Arpit Todewal"
        },
        {
            "ds": "DepartmentHead",
            "key": "UI",
            "val": "DEEPAK PAL"
        },
        {
            "ds": "DepartmentHead",
            "key": "UI",
            "val": "DEEPAK PAL"
        }
    ]
}                                         
                                                
                                            
                                                
{
    "status": 200,
    "data": [
        {
            "status": 200
        },
        {
            "status": 200,
            "data": "Arpit Todewal"
        },
        {
            "status": 200
        },
        {
            "status": 200
        },
        {
            "status": 200
        },
        {
            "status": 200
        },
        {
            "status": 200
        },
        {
            "status": 200
        },
        {
            "status": 200
        }
    ]
}                                                   
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.

# Any - To getAll key-value data and to create or select workspace .

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /kvp/api/any
tm : Creation time : It is the time at which key is created in the data structure .
exp : Expiry Time : It is the expiry time in milli seconds of a key, after the expiry time of the given key is finished the data will not be accessible .           If exp has value 0 then the given key will never expire.

                                            
{
    "token": <"connection-token">,
    "cmd": "getAll",
    <<"ws": <"workspace-name">,>>
    "ds": <"ds-name">
}
                                                
                                            
                                            
{
    "token": "-485248203|-6551359644015639522|-485250422",
    "cmd": "getAll",
    "ws": "Company",
    "ds": "Employee"
}                                     
                                                
                                            
                                                
{
    "status": 200,
    "data": [
        {
            "E02": "SALONI PATNI",
            "tm": 1538548588973,
            "exp": 0
        },
        {
            "E01": "SANJAY VERMA",
            "tm": 1538548588973,
            "exp": 0
        },
        {
            "E04": "AMIT SHARMA",
            "tm": 1538548588973,
            "exp": 0
        },
        {
            "E03": "DEEPAK PAL",
            "tm": 1538548588973,
            "exp": 0
        },
        {
            "E05": "Arpit Todewal",
            "tm": 1538548588973,
            "exp": 0
        }
    ]
}                                                   
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
1000 for error, error can be due to workspace not present.
1001 for error, error can be due to data structure not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "selectNextWs"
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "selectNextWs"
}                                
                                                
                                            
                                                
{
    "status": 200,
    "data": "3"
}                                                   
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
                                            
{
    "token": <"connection-token">,
    "cmd": "selectWs",
    "ws": <"workspace-name">
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "selectWs",
    "ws": "Company"
}                                  
                                                
                                            
                                                
{
    "status": 200,
    "data": "Company"
}
                                             
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax .
1000 for error, error can be due to workspace not present.

# Meta - To get the meta data of the KVP-DB .

Http method : POST
Base url : http://api.login2explore.com:5577
End-point url : /kvp/api/meta
                                            
{
    "token": <"connection-token">,
    "cmd": "getAllWs"
}
                                                
                                            
                                            
{
    "token": "-485248203|-6551359644015639522|-485250422",
    "cmd": "getAllWs"
}                                     
                                                
                                            
                                                
{
    "status": 200,
    "data": [
        "0",
        "1",
        "2",
        "3",
        "Company"
    ]
}                                                  
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to workspace not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "getAllDataStructures",
    <<"ws": <"main-workspace-name">,>>
}
                                                
                                            
                                            
{
    "token": "401400726|-363956312424328770|401400726",
    "cmd": "getAllDataStructures",
    "ws":"0"
}                                
                                                
                                            
                                                
{
    "status": 200,
    "data": [
        "DsDefault",
        "LinkedHashMap"
    ]
}                                                  
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax.
1000 for error, error can be due to workspace not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "getWsName",
    <<"ws": <workspace-ID>,>>
}
                                                
                                            
                                            
{
    "token": "90936382|-31948870017672028|90936187",
    "cmd": "getWsName",
    "ws": 1
}                               
                                                
                                            
                                                
{
    "status": 200,
    "data": "Company"
}                                                 
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or WORKSPACE_ID_NOT_PRESENT or WORKSPACE_ID_CAN_NOT_BE_NEGATIVE.
1000 for error, error can be due to workspace not present.
                                            
{
    "token": <"connection-token">,
    "cmd": "getWsId",
    <<"ws": <"workspace-name">,>>
}
                                                
                                            
                                            
{
    "token": "90936382|-31948870017672028|90936187",
    "cmd": "getWsId",
    "ws": "Company"
}                                 
                                                
                                            
                                                
{
    "status": 200,
    "data": "1"
}                                                 
                                                
                                            
200 for success
401 for error, error due to Invalid Token.
400 for error, error can be due to syntax or WORKSPCE_NAME_NOT_PRESENT .
1000 for error, error can be due to workspace not present.

jpdb-commons.js


Javascript Library

Collection of javascript functions to to speedup the development.