# Connection Token - Connecting to JPDB API.
# How to get the 'connection-token' from JsonPowerDB :
# Response Headers in JPDB :
# IML (JPDB Index Manipulation Language) - To insert, update and delete Json data.
{
"token": <"connection-token">,
"cmd": "PUT",
<<"dbName": <"database-name">,>>
<<"rel": <"relation-name">,>>
<<"colsAutoIndex": <boolean-value>,>>
<<"templateStr": <json-template-data>,>>
"jsonStr": <json-data>
}
Using Javascript? Include following Javascript file to easily create the PUT request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create PUT request is - createPUTRequest(token, jsonObj, dbName, relName);
{
"token": "-1935843913|3223940520357615501|-1935843909",
"cmd": "PUT",
"dbName": "Student",
"rel": "Student-Rel",
"jsonStr": {
"id": "1",
"name": "Soniya",
"email": "soniya@gmail.com",
"mobileno": "9967825671"
}
}
{
"data": {
"rec_no": [1]
},
"additionalData": {
"processReqType": 0,
"dbUpdateFlag": true
},
"message": "DATA INSERTED, Total 1 rows are inserted, Added 0 columns as New Index Columns.",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "PUT_ALL",
<<"dbName": <"database-name">,>>
<<"rel": <"relation-name">,>>
<<"colsAutoIndex": <boolean-value>,>>
<<"templateStr": <json-template-data>,>>
"jsonStr": <[json-data-array]>
}
{
"token": "608862679|6881615562961411263|608862579",
"cmd": "PUT_ALL",
"dbName": "Employee",
"rel": "index",
"templateStr": {},
"colsAutoIndex": true,
"jsonStr": [
{
"name": "Pranitha",
"email": "pranitha@gmail.com",
"password": "3293",
"passwrd": "3293"
},
{
"name": "Sarah Khan",
"email": "sarahkhan@gmail.com",
"password": "3823",
"passwrd": "3823"
},
{
"name": "Akhil",
"email": "akhil81@gmail.com",
"password": "3273",
"passwrd": "3273"
}
]
}
{
"data": {
"rec_no": [12,13,14]
},
"additionalData": {
"processReqType": 0,
"dbUpdateFlag": true
},
"message": "DATA INSERTED, Total 3 rows are inserted, Added 0 columns as New Index Columns.",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "UPDATE",
<<"dbName": "database-name",>>
<<"rel": "relation-name",>>
"jsonStr": {
<"record-no">: {
<"column-name">: <"new-value">
}
<"record-no">: {
<"column-name">: <"new-value">
}
}
}
Using Javascript? Include following Javascript file to easily create the UPDATE request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create UPDATE request for one record is - createUPDATERecordRequest(token, jsonObj, dbName, relName, recNo);
{
"token": "90937075|-31948812362179105|90938333",
"cmd": "UPDATE",
"dbName": "Employee-DB",
"rel": "Employee",
"jsonStr": {
"3":{
"full_name": "Gargee Mishra",
"email_address":"gargee@gmail.com",
"mobile_number": 7098162348
},
"6":{
"full_name":"Kanishk Mishra",
"email_address":"kanishk@gmail.com",
"mobile_number": 9000876578
},
"5":{
"full_name":"Sulbha Mishra",
"email_address":"sulbha@gmail.com"
}
}
}
{
"data": {
"3": {
"full_name":"gargee",
"email_address": "gargee@gmail.com",
"mobile_number": "8989890011"
},
"5": {
"full_name": "kanishk mishra",
"email_address": "mishra@gmail.com",
"mobile_number": "9000876578"
},
"6": {
"full_name": "sulbha misra",
"email_address": "sulbha@gmail.com",
"mobile_number": "8090712341"
},
"NewIndexColumnCreated": 0,
"NewNonIndexColumnCreated": 0
},
"additionalData": {
"processReqType": 0,
"dbUpdateFlag": true
},
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "SET",
<<"dbName": <"database-name">,>>
<<"rel": <"relation-name">,>>
<<"colsAutoIndex": <boolean-value>,>>
<<"templateStr": <json-template-data>,>>
<<"uniqueKeys": <["unique-key1",...]>,>>
<<"foreignKeys" : <[
{"foreignKey": <"column-name">,
<<"inDb": <"database-name">,>>
<<"inRel": <"relation-name">,>>
"inCol": <"foreign-column-name">,
<<"optional": <boolean-value> >>
},...]>, >>
<<"type": <"type">,>>
"primaryKey": <"primary-key">,
"jsonStr":<"json-data">
}
Using Javascript? Include following Javascript file to easily create the SET request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create SET request is - createSETRequest(token, jsonStr, dbName, relName, type, primaryKey, uniqueKeys, foreignKeys);
{
"token": "608862679|6881615571065068944|608862465",
"cmd": "SET",
"dbName": "Employee",
"rel": "EMPLOYEE_DETAIL",
"type": "PUT",
"primaryKey": "Email-address",
"uniqueKeys": ["User-name", "Phone-number"],
"foreignKeys": [
{"foreignKey": "Mgr-ID",
"inCol": "ID",
"optional": true}
],
"jsonStr": {
"ID" : 2901,
"User-name": "kanishk",
"Name": "kanishk kanna",
"Email-address": "kanishk@gmail.com",
"Phone-number": 8790654321,
"Address": "plasia road",
"Mgr-ID" : ""
}
}
{
"data": {
"rec_no": [7],
"old_records": []
},
"additionalData": {
"processReqType": 0,
"dbUpdateFlag": true
},
"message": "DATA INSERTED , Total 1 rows are inserted, Added 0 columns as New Index Columns.",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "SET_ALL",
<<"dbName": <"database-name">,>>
<<"rel": <"relation-name">,>>
<<"colsAutoIndex": <boolean-value>,>>
<<"templateStr": <json-template-data>,>>
<<"uniqueKeys": <["unique-key1",...]>,>>
<<"foreignKeys" : <[
{"foreignKey": <"column-name">,
<<"inDb": <"database-name">,>>
<<"inRel": <"relation-name">,>>
"inCol": <"foreign-column-name">,
<<"optional": <boolean-value> >>
},...]>, >>
<<"type": <"type">,>>
"primaryKey": <"primary-key">,
"jsonStr": <[json-data-array]>
}
Using Javascript? Include following Javascript file to easily create the SET_ALL request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create SET_ALL request is - createSET_ALLRequest(token, jsonStr, dbName, relName, type, primaryKey, uniqueKeys, foreignKeys);
{
"token": "608862679|6881615571065068944|608862465",
"cmd": "SET_ALL",
"dbName": "Employee",
"rel": "EMPLOYEE_DETAIL",
"type": "DEFAULT",
"primaryKey": "Email-address",
"uniqueKeys": ["User-name", "Phone-number"],
"foreignKeys": [
{"foreignKey": "Mgr-ID",
"inCol": "ID",
"optional": true}
],
"jsonStr": [
{
"ID" : 280,
"User-name": "amishra",
"Email-address": "aayushi@gmail.com",
"Address": "gandhi nagar"
},
{
"ID" : 285,
"User-name": "jayesh",
"Name": "jayesh kanna",
"Email-address": "jayesh@gmail.com",
"Phone-number": 7865431289,
"Address": "Airport Road",
"Mgr-ID" : 280
},
{
"User-name": "garvit",
"Name": "garvit kanna",
"Email-address": "garvit@gmail.com",
"Phone-number": 6789654312,
"Address": "Madhumilan square",
"Mgr-ID" : 280
}
]
}
{
"data": {
"rec_no": [5, 6],
"old_records": [{
"3": {
"Address": "kalani nagar",
"Email-address": "aayushi@gmail.com",
"User-name": "aayushi"
},
"NewIndexColumnCreated": 0,
"NewNonIndexColumnCreated": 0
}]
},
"additionalData": {
"processReqType": 0,
"dbUpdateFlag": true
},
"message": "DATA INSERTED , Total 2 rows are inserted, Added 0 columns as New Index Columns.",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "REMOVE",
<<"dbName": <"database-name">,>>
<<"rel": <"relation-name">,>>
"record": <record-number | [record-number1,...] | {"range":[from-rec-no,to-rec-no]}>
"jsonStr" : {}
}
Using Javascript? Include following Javascript file to easily create the REMOVE request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create REMOVE request is - createREMOVERecordRequest(token, dbName, relName, reqId);
{
"token": "401400726|-363956312424328770|401400726",
"cmd": "REMOVE",
"dbName": "Company",
"rel": "Employee",
"record": 1,
"jsonStr" : {}
}
{
"data": {
"removedRecNos":[1],
"alreadyRemovedRecNos":[],
"invalidRecNos":[]
},
"message": "Success",
"status": 200
}
Pluggable APIs:-
If the any of the following pluggable commands are not working in your instance, please email with details at support@login2explore.com
{
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr" : <[["col-name1","copy-col-name1"],...]>,
<<"forceUpdate": <boolean-value>,>>
}
{
"dbName": "Employee_DB",
"rel": "Employee",
"jsonStr": [["Name", "emp_name"], ["Email-address", "emp_email_id"]],
"forceUpadte": true
}
{
"data": "{}",
"message": "2 Columns Copied",
"status": 200
}
{
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr" : <[["old-col-name1”,”new-col-name1"],...]>,
}
{
"dbName": "Employee_DB",
"rel": "Employee",
"jsonStr": [["Phone-number", "EMP_MOBILE_NUMBER"], ["Name", "EMP_NAME"], ["Address", "EMP_ADDRESS"]]
}
{
"data": "{}",
"message": "3 Columns Renamed",
"status": 200
}
{
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr" : <["col-name1",...]>,
}
{
"dbName": "Employee_DB",
"rel": "Employee",
"jsonStr": ["EMP_MOBILE_NUMBER","EMP_NAME","EMP_ADDRESS"]
}
{
"data": "{}",
"message": "3 Columns Removed",
"status": 200
}
{
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr" : <[["col-name1","data-type1"],...]>,
}
{
"dbName": "Employee_DB",
"rel": "Employee",
"jsonStr": [["EMP_MOBILE_NUMBER","Long"],["EMP_NAME","String"],["EMP_ADDRESS","String"],["SALARY_ABOVE_40000","Boolean"]]
}
{
"data": "{}",
"message": "3 Columns data type changed",
"status": 200
}
{
"dbName": <"database-name">,
"token": <"connection-token">,
"rel": <"relation-name">,
"jsonStr": {
<< "forceReplace": true / false, >> // default value => true - replace existing value of trgCol if set true
"srcCol1" : "colName1",
"delSrcCol1" : true / false, // default value => false
<<"srcCol2" : "colName2",
<<"delSrcCol2" : true / false; >> >> // default value => false
"tarCol" : "colName3",
<<"tarColType" : "String" | "Double" | "Long" | "Boolean" >> // by default the highest colType will be used otherwise the given type will be modified.
}
}
{
"dbName": "SAMPLE",
"rel": "SAMPLE-REL",
"jsonStr": {
"forceReplace":false,
"srcCol1" : "firstName",
"delSrcCol1" : false,
"srcCol2" : "lastName",
"delSrcCol2" : false,
"tarCol" : "fullName"
"tarColType": "String"
}
}
{
"data": "{\"changeType\":{},\"copyCol\":{}}",
"message": "firstName and lastName merged in new column fullName",
"status": 200
}
# IRL (JPDB Index Retrieval Language) - To retrieve Json data.
{
"token": <"connection-token">,
"cmd": "GET",
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr": {
<"column-name">:<"column-value">
}
}
GET returns only first record that matches json value in that column.
Using Javascript? Include following Javascript file to easily create the GET request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET request is - createGETRequest(token, dbname, relationName, jsonObjStr);
{
"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 RETRIEVED FROM PI",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_BY_KEY",
"dbName": <"database-name">,
"rel": <"relation-name">,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value>,>>
"jsonStr": {
<"column-name">: <"column-value">
}
}
Using Javascript? Include following Javascript file to easily create the GET_BY_KEY request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET_BY_KEY request is - createGET_BY_KEYRequest(token, dbname, relationName, jsonObjStr, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "GET_BY_KEY",
"rel": "MEMBERS-FAMILY",
"createTime": true,
"updateTime": true,
"jsonStr": {
"name": "Mrs. Mamta Modi"
}
}
{
"data": {
"rec_no": 1,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "A+",
"name": "Mrs. Mamta Modi",
"mobile": "8349999434",
"memberOf": "TMM"
},
"updated": 1573124919206
},
"message": "DATA RETRIEVED FROM PI",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_ALL",
"dbName": <"database-name">,
"rel": <"relation-name">,
<<"timeStamp":<time-stamp>,>>
<<"cols":<< "*" > | <["col1",...]>,>>
<<"pageNo":<page-number>,>>
<<"pageSize":<page-size>,>>
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "GET_ALL",
"rel": "MEMBERS-FAMILY",
"pageNo": 1,
"pageSize": 5,
"createTime": true,
"updateTime": true
}
{
"data": {
"file_status": "OK",
"total_records": 1190,
"json_records": [{
"rec_no": 1,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "A+",
"name": "Mrs. Mamta Modi",
"mobile": "8349999434",
"memberOf": "TMM"
},
"updated": 1573124919206
}, {
"rec_no": 2,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "",
"name": "Amit Modi",
"mobile": "",
"memberOf": "TYP"
},
"updated": 1573124919206
}],
"total_pages": 595,
"current_page": 1
},
"message": "DATA RETRIEVED FORM PI",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "FIND_ALL_RECORDS",
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr": {
<"column-name">:<"column-value">
},
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the FIND_ALL_RECORDS request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create FIND_ALL_RECORDS request is - createFIND_ALL_RECORDSRequest(token, dbName, relName, jsonObjStr, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "FIND_ALL_RECORDS",
"rel": "MEMBERS",
"jsonStr": {
"bloodGroup": "O+"
},
"createTime": true,
"updateTime": true
}
{
"data": [{
"rec_no": 2,
"created": 1573124919039,
"record": {
"regNo": "202",
"profession": "Durga Parts & Lubricants",
"address": "201, Gold-Petels\r\n16\/2, South tukoganj\r\nNear Sahaj Hospital\r\nIndore - 452001",
"mobile": "7000089795",
"reference": "347",
"bloodGroup": "",
"zone": "5",
"name": "Bahadur Singh Sancheti",
"nativePlace": "Sardarsahr (Rajasthan)",
"businessAddress": "Durga Sales Agencies\r\n9\/47, Sapna Sangeeta Road\r\nSneh Nagar, Indore- 452001 (M.P.)",
"email": "",
"contactNo": "07312512047"
},
"updated": 1573124919039
}],
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
"record": <record-number>
}
Using Javascript? Include following Javascript file to easily create the GET_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET_RECORD request is - createGET_RECORDRequest(token, dbName, relName, record);
{
"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
}
{
"token": <"connection-token">,
"cmd": "GET_BY_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
"record": <record-number>,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the GET_BY_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET_BY_RECORD request is - createGET_BY_RECORDRequest(token, dbName, relName, record, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "GET_BY_RECORD",
"rel": "MEMBERS-FAMILY",
"record": 2,
"createTime": true,
"updateTime": true
}
{
"data": {
"rec_no": 2,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "",
"name": "Amit Modi",
"mobile": "",
"memberOf": "TYP"
},
"updated": 1573124919206
},
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "FIRST_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the FIRST_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create FIRST_RECORD request is -createFIRST_RECORDRequest(token, dbName, relName, createTime, updateTime) ;
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "FIRST_RECORD",
"rel": "MEMBERS-FAMILY",
"createTime": true,
"updateTime": true
}
{
"data": {
"rec_no": 1,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "A+",
"name": "Mrs. Mamta Modi",
"mobile": "8349999434",
"memberOf": "TMM"
},
"updated": 1573124919206
},
"message": "OK",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "LAST_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the LAST_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create LAST_RECORD request is - createLAST_RECORDRequest(token, dbName, relName, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "LAST_RECORD",
"rel": "MEMBERS-FAMILY",
"createTime": true,
"updateTime": true
}
{
"data": {
"rec_no": 1190,
"created": 1573124919368,
"record": {
"regNo": "314",
"bloodGroup": "A+",
"name": "Rishi Sancheti",
"mobile": "9424890261",
"memberOf": "TYP"
},
"updated": 1573124919368
},
"message": "OK",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "NEXT_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
"record": <record-number>,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the NEXT_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create NEXT_RECORD request is - createNEXT_RECORDRequest(token, dbName, relName, recordNumber, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "NEXT_RECORD",
"rel": "MEMBERS-FAMILY",
"record": 2,
"createTime": true,
"updateTime": true
}
{
"data": {
"rec_no": 3,
"created": 1573124919206,
"record": {
"regNo": "202",
"bloodGroup": "A+",
"name": "Mrs. Pushpa Sancheti",
"mobile": "9329547240",
"memberOf": "TMM"
},
"updated": 1573124919206
},
"message": "OK",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "PREV_RECORD",
"dbName": <"database-name">,
"rel": <"relation-name">,
"record": <record-number>,
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the PREV_RECORD request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create PREV_RECORD request is - createPREV_RECORDRequest(token, dbName, relName, recordNumber, createTime, updateTime) ;
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "PREV_RECORD",
"rel": "MEMBERS-FAMILY",
"record": 2,
"createTime": true,
"updateTime": true
}
{
"data": {
"rec_no": 1,
"created": 1573124919206,
"record": {
"regNo": "201",
"bloodGroup": "A+",
"name": "Mrs. Mamta Modi",
"mobile": "8349999434",
"memberOf": "TMM"
},
"updated": 1573124919206
},
"message": "OK",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_RELATION_STATS",
"dbName": <"database-name">,
"rel": <"relation-name">,
<<"getDataSize": <"boolean-value">,>>
}
GET_RELATION_SIZE is deprecated.
Using Javascript? Include following Javascript file to easily create the GET_RELATION_STATS request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET_RELATION_STATS request is - createGET_RELATION_STATSRequest(token, dbname, relationName);
{
"token": "2134770734|1905622745254386678|2134771170",
"cmd": "GET_RELATION_STATS",
"dbName": "Employee",
"rel": "Details",
"getDataSize": true
}
{
"data": "{
"record_count":10,
"relName":"Details",
"rel_timestamp":1717751582740,
"size":1478,
"delete_count":40,
}",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_ALL_DB"
}
{
"token": "2134770734|1905622745244281054|2134771272",
"cmd": "GET_ALL_DB"
}
{
"data": [
"Company"
],
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_DB_STATS",
"dbName": <"database-name">,
<<"getDataSize": <"boolean-value">,>>
}
{
"token": "608862677|6881615657484689906|608862671",
"cmd": "GET_DB_STATS",
"dbName": "Employee-DB",
"getDataSize": true
}
{
"data": [{
"record_count": 9,
"relName": "Admin-User",
"rel_timestamp": 1573728947267,
"delete_count": 1
"size" : 712
}, {
"record_count": 0,
"relName": "Admin-User_session",
"rel_timestamp": 1573728960495,
"delete_count": 7
"size" : 514
}, {
"record_count": 7,
"relName": "Employee",
"rel_timestamp": 1573727990169,
"delete_count": 1
"size" : 602
}],
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_USER_STATS",
<<"getDataSize": <"boolean-value">,>>
}
{
"token": "2134770734|1905622745408421709|2134771389",
"cmd": "GET_USER_STATS",
"getDataSize": true
}
{
"data": "{
"indexCount":[12,1000],
"userDataSizeCount":[2181,100000],
"rowCount":[25,1000000],
"relCount":[3,100],
"dbCount":[2,10],
}",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_INDEXED_COL",
"dbName": <"database-name">,
"rel": <"relation-name">
}
{
"token": "2134770734|1905622745408421709|2134771389",
"cmd": "GET_INDEXED_COL",
"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
}
{
"token": <"connection-token">,
"cmd": "GET_NON_INDEXED_COL",
"dbName": <"database-name">,
"rel": <"relation-name">
}
{
"token": "2134770734|1905622745408421709|2134771389",
"cmd": "GET_NON_INDEXED_COL",
"dbName": "databaseName",
"rel": "relationName"
}
{
"data": [
{"colName":"is_permanent_employee","colType":"Boolean"}
],
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "GET_ALL_COL",
"dbName": <"database-name">,
"rel": <"relation-name">
}
Using Javascript? Include following Javascript file to easily create the GET_ALL_COL request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create GET_ALL_COL request is - createGETALLCOLRequest(token, dbName, relName);
{
"token": "2134770734|1905622745408421709|2134771389",
"cmd": "GET_ALL_COL",
"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
}
{
"token": <"connection-token">,
"cmd": "IS_COLUMN_INDEXED",
"dbName": <"database-name">,
"rel": <"relation-name">,
"colName": <"column-name">
}
{
"token": "-1167378241|1086969150968262306|-1167383633",
"cmd": "IS_COLUMN_INDEXED",
"dbName": "databaseName",
"rel": "relationName",
"colName": "empAllowance"
}
{
"data": "true",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "IS_COLUMN_EXIST",
"dbName": <"database-name">,
"rel": <"relation-name">,
"colName": <"column-name">
}
Using Javascript? Include following Javascript file to easily create the IS_COLUMN_EXIST request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create IS_COLUMN_EXIST request is - createIS_COLUMN_EXISTRequest(token, dbname, relationName, colName);
{
"token": "-1167378241|1086969150968262306|-1167383633",
"cmd": "IS_COLUMN_EXIST",
"dbName": "databaseName",
"rel": "relationName",
"colName": "empBasic"
}
{
"data": "true",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "IS_RELATION_EXISTS",
"dbName": <"database-name">,
"rel": <"relation-name">
}
{
"token":"608862677|6881615657484689906|608862671",
"cmd": "IS_RELATION_EXISTS",
"dbName": "Employee-DB",
"rel":"Admin-User"
}
{
"data": "true",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "IS_DATABASE_EXISTS",
"dbName": <"database-name">,
}
{
"token":"608862677|6881615657484689906|608862671",
"cmd": "IS_DATABASE_EXISTS",
"dbName": "Employee-DB",
}
{
"data": "true",
"message": "Success",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "SYNC_DB",
"dbName": <"database-name">,
"relTsJson": {
<"rel1">:<time-stamp1> <<,<"rel2">:<time-stamp2> >>...
},
<<"createTime": <boolean-value>,>>
<<"updateTime": <boolean-value> >>
}
Using Javascript? Include following Javascript file to easily create the SYNC_DB request.
src="https://login2explore.com/jpdb/resources/js/0.0.4/jpdb-commons.js"
Method to create SYNC_DB request is - createSYNC_DBRequest(token, dbName, relTimestampObjStr, createTime, updateTime);
{
"token": "608862679|6881615563234464505|608862542",
"dbName": "INDORE-TERAPANTH-DIRECTORY",
"cmd": "SYNC_DB",
"relTsJson": {
"DONATION": 0
},
"createTime": true,
"updateTime": true
}
{
"data": [{
"record_count": 2,
"relName": "DONATION",
"rel_timestamp": 1573124918795,
"delete_count": 0,
"json_records": [{
"rec_no": 1,
"created": 1573124918794,
"record": {
"miCode": "f02d",
"donationName": "Directory",
"visibility": "show",
"content": "TYP presents the FIRST ever digital directory for Indore Terapanth samaaj",
"url": "https:\/\/p-y.tm\/M04K-3Z"
},
"updated": 1573124918794
}, {
"rec_no": 2,
"created": 1573124918795,
"record": {
"miCode": "f4b9",
"donationName": "2021",
"visibility": "show",
"content": "Acharya Shree Mahapragya Ji ka Indore Agaman.",
"url": "https:\/\/p-y.tm\/M04K-3Z"
},
"updated": 1573124918795
}]
}],
"message": "DATA RETRIEVED FROM PI",
"status": 200
}
# IDL (JPDB Index Definition Language) - To add index column and remove column / relation / database.
{
"token": <"connection-token">,
"cmd": "INDEX_COLUMN",
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr": {
<"column-name-1":"dummy-value-type-1",...>
}
}
{
"token": "2134770734|1905622745408438787|2134771388",
"cmd": "INDEX_COLUMN",
"dbName": "Company",
"rel": "Employee",
"jsonStr": {
"empName": "Arpit",
"empSalary": 25000
}
}
{
"data": {
"empName": "Arpit"
},
"message": "COLUMN ADDED TO PI",
"status": 200
}
{
"token": <"connection-token">,
"cmd": "UNINDEX_COLUMN",
"dbName": <"database-name">,
"rel": <"relation-name">,
"jsonStr": {
<"column-name-1":"dummy-value-type-1",...>
}
}
{
"token": "2134770734|1905622745408438787|2134771388",
"cmd": "UNINDEX_COLUMN",
"dbName": "Company",
"rel": "Employee",
"jsonStr": {
"empName": "Arpit",
"empSalary": 25000
}
}
{
"data": {
"empName": "Arpit"
},
"message": "COLUMN IS NOW UNINDEXED",
"status": 200
}
{
"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
}
{
"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
}