Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jesusjavierdediego
Created October 18, 2022 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesusjavierdediego/a6d60744479bfea5dbe1b9dd5d8cf7c2 to your computer and use it in GitHub Desktop.
Save jesusjavierdediego/a6d60744479bfea5dbe1b9dd5d8cf7c2 to your computer and use it in GitHub Desktop.
{
"info": {
"_postman_id": "92479538-668b-4f98-abaa-7eb43a36947c",
"name": "XQLedger",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "959896"
},
"item": [
{
"name": "Get record rdb",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8081/xqledger/v1/record/618278810944844607588182",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"record",
"618278810944844607588182"
]
}
},
"response": []
},
{
"name": "Post Batch",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": \"batchA\",\n \"dbname\": \"TestRepositoryPerformance\",\n \"operation_type\": \"new\",\n \"records\": [\n {\n \"id\": \"20\",\n \"group\": \"\",\n \"dbname\": \"TestRepositoryPerformance\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"new\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"{\\\"_id\\\":\\\"20\\\",\\\"first_name\\\":\\\"Juan\\\",\\\"last_name\\\":\\\"Pringao\\\",\\\"gender\\\":\\\"Unknown\\\",\\\"age\\\":33,\\\"salary\\\":6700,\\\"country\\\":\\\"Spanistan\\\"}\",\n \"status\": \"PENDING\"\n },\n {\n \"id\": \"21\",\n \"group\": \"\",\n \"dbname\": \"TestRepositoryPerformance\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"new\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"message\": \"2001\",\n \"record_content\": \"{\\\"_id\\\":\\\"21\\\",\\\"first_name\\\":\\\"John\\\",\\\"last_name\\\":\\\"Connor\\\",\\\"gender\\\":\\\"Male\\\",\\\"age\\\":44,\\\"salary\\\":56000,\\\"country\\\":\\\"USA\\\"}\",\n \"status\": \"PENDING\"\n },\n {\n \"id\": \"22\",\n \"group\": \"\",\n \"dbname\": \"TestRepositoryPerformance\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"new\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"{\\\"_id\\\":\\\"22\\\",\\\"first_name\\\":\\\"Juan\\\",\\\"last_name\\\":\\\"Pringao\\\",\\\"gender\\\":\\\"Unknown\\\",\\\"age\\\":33,\\\"salary\\\":6700,\\\"country\\\":\\\"Spanistan\\\"}\",\n \"status\": \"PENDING\"\n }\n ]\n}"
},
"url": {
"raw": "localhost:8081/xqledger/v1/batch",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"batch"
]
}
},
"response": []
},
{
"name": "Post Single",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": \"a4\",\n \"group\": \"\",\n \"dbname\": \"TestRepository3\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"new\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"{\\\"_id\\\":\\\"a4\\\",\\\"first_name\\\":\\\"Micheal\\\",\\\"last_name\\\":\\\"Oligach\\\",\\\"gender\\\":\\\"Female\\\",\\\"age\\\":2000,\\\"salary\\\":76,\\\"country\\\":\\\"Spainistan\\\"}\",\n \"status\": \"PENDING\"\n}"
},
"url": {
"raw": "localhost:8081/xqledger/v1/record",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"record"
]
}
},
"response": []
},
{
"name": "Update Record",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": \"618278810944844607588182\",\n \"group\": \"\",\n \"dbname\": \"TestRepository\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"update\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"{\\\"_id\\\":\\\"618278810944844607588182\\\",\\\"first_name\\\":\\\"Micheal\\\",\\\"last_name\\\":\\\"Carpenter\\\",\\\"gender\\\":\\\"Male\\\",\\\"age\\\":23,\\\"salary\\\":18000,\\\"country\\\":\\\"Romania\\\"}\",\n \"status\": \"PENDING\"\n }"
},
"url": {
"raw": "localhost:8081/xqledger/v1/record",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"record"
]
}
},
"response": []
},
{
"name": "Update Batch",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"recordset\": [\n {\n \"id\": \"953681629343745477424160\",\n \"group\": \"\",\n \"dbname\": \"TestRepository\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"update\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"{\\\"_id\\\":\\\"953681629343745477424160\\\",\\\"first_name\\\":\\\"Juan\\\",\\\"last_name\\\":\\\"Pringao\\\",\\\"gender\\\":\\\"Incel\\\",\\\"age\\\":67,\\\"salary\\\":5000,\\\"country\\\":\\\"Spanistan\\\"}\",\n \"status\": \"PENDING\"\n },\n {\n \"id\": \"577506300452605125481581\",\n \"group\": \"\",\n \"dbname\": \"TestRepository\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"update\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"message\": \"2001\",\n \"record_content\": \"{\\\"_id\\\":\\\"577506300452605125481581\\\",\\\"first_name\\\":\\\"John\\\",\\\"last_name\\\":\\\"Garcia (formerly Connor)\\\",\\\"gender\\\":\\\"Male\\\",\\\"age\\\":44,\\\"salary\\\":60000,\\\"country\\\":\\\"USA\\\"}\",\n \"status\": \"PENDING\"\n }\n ]\n}"
},
"url": {
"raw": "localhost:8081/xqledger/v1/batch",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"batch"
]
}
},
"response": []
},
{
"name": "Delete Record",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"recordset\": [\n {\n \"id\": \"618278810944844607588182\",\n \"group\": \"\",\n \"dbname\": \"TestRepository\",\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"operation_type\": \"delete\",\n \"sending_time\": 0,\n \"reception_time\": 0,\n \"processing_time\": 0,\n \"priority\": \"MEDIUM\",\n \"record_content\": \"\",\n \"status\": \"PENDING\"\n }\n ]\n}"
},
"url": {
"raw": "localhost:8081/xqledger/v1/record",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"record"
]
}
},
"response": []
},
{
"name": "Get Record History",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8081/xqledger/v1/recordhistory?file=284437123211381344321427.json&db=TestRepository",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"recordhistory"
],
"query": [
{
"key": "file",
"value": "284437123211381344321427.json"
},
{
"key": "db",
"value": "TestRepository"
}
]
}
},
"response": []
},
{
"name": "Get Record Commit Content",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8081/xqledger/v1/recordevent?commit=46431642664746a6af44959520ba8f2b&file=300533218603495434061423.json&db=TestRepository",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"recordevent"
],
"query": [
{
"key": "commit",
"value": "46431642664746a6af44959520ba8f2b"
},
{
"key": "file",
"value": "300533218603495434061423.json"
},
{
"key": "db",
"value": "TestRepository"
}
]
}
},
"response": []
},
{
"name": "Get Record Diff",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8081/xqledger/v1/recorddiff?commitnew=ce6f274afa3549be010fd8c3d25d5b2d10ba56e4&file=17155780968166547879.json&db=TestRepository&commitold=15f0f595672f500aad6648b2b522020705de8147",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"recorddiff"
],
"query": [
{
"key": "commitnew",
"value": "ce6f274afa3549be010fd8c3d25d5b2d10ba56e4"
},
{
"key": "file",
"value": "17155780968166547879.json"
},
{
"key": "db",
"value": "TestRepository"
},
{
"key": "commitold",
"value": "15f0f595672f500aad6648b2b522020705de8147"
}
]
}
},
"response": []
},
{
"name": "API Router keepalive",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8081/xqledger/v1/keepalive",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"keepalive"
]
}
},
"response": []
},
{
"name": "All records Query",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8081/xqledger/v1/query/TestRepository",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"query",
"TestRepository"
]
}
},
"response": []
},
{
"name": "Count all records",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "{}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8081/xqledger/v1/recordcount?dbname=TestRepository&collection=main",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"recordcount"
],
"query": [
{
"key": "dbname",
"value": "TestRepository"
},
{
"key": "collection",
"value": "main"
}
]
}
},
"response": []
},
{
"name": "Tenants",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "{}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8081/xqledger/v1/tenants?id=1",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"tenants"
],
"query": [
{
"key": "id",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "New Session",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "dbname",
"value": "TestRepository",
"type": "text",
"disabled": true
},
{
"key": "description",
"value": "Test session 1",
"type": "text",
"disabled": true
},
{
"key": "user",
"value": "TestOrchestrator@xqledger.com",
"type": "text",
"disabled": true
}
]
},
"url": {
"raw": "localhost:8081/xqledger/v1/session?dbname=TestRepository&description=Test session 100&user=TestOrchestrator@xqledger.com&collectionID=1",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"session"
],
"query": [
{
"key": "dbname",
"value": "TestRepository"
},
{
"key": "description",
"value": "Test session 100"
},
{
"key": "user",
"value": "TestOrchestrator@xqledger.com"
},
{
"key": "collectionID",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "Close Session",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"sessionid\": 14,\n \"user\": \"TestOrchestrator@xqledger.com\",\n \"branch\": \"8f07ecfa5d3944edac6cc0584e1fd91e\",\n \"description\": \"Test session 100\",\n \"starttime\": 1641230864,\n \"endtime\": 0,\n \"collection\": {\n \"collectionid\": 1,\n \"name\": \"main\",\n \"description\": \"First collection for testing\",\n \"creation\": 1641035236,\n \"active\": true\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8081/xqledger/v1/session?dbname=TestRepository&description=Test session 1&user=TestOrchestrator@xqledger.com&collectionID=1",
"host": [
"localhost"
],
"port": "8081",
"path": [
"xqledger",
"v1",
"session"
],
"query": [
{
"key": "dbname",
"value": "TestRepository"
},
{
"key": "description",
"value": "Test session 1"
},
{
"key": "user",
"value": "TestOrchestrator@xqledger.com"
},
{
"key": "collectionID",
"value": "1"
}
]
}
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment