Authentication
About : checks the user credential and issues a JWT token. Method : POST End point: ../api/authapi/login
Request POST "../api/authapi/login" Body

{ "email" : "mycoolMail@example.com", "password" : "pizza" }

Response

{ "token": "{JWTToken}", "id": "326a5ae7-00d1-4b91-9d21-299db076cdab", "email": "mycoolMail@example.com", "fullName": "cheese", "dob": "1996-11-03T20:00:00Z", "isMailConfirmed": true }

About : registers a new user. Method : POST End point: ../api/authapi/register
Request POST "../api/authapi/register" Body

{ "name" : "Foo", "email" : "mycoolMail@example.com", "password": "pizza", "ConfirmPassword" : "pizza", "dob" : "1996-11-04" }

Response

Status code 200 Ok

Databases
About : get the list of databases the user created. Method : GET End point: ../api/databaseapi/databases Authrized JWT token
Request GET "../api/databaseapi/databases" Headers
  • pagination {"CurrentPage": 1 ,"FetchRecordCount" :0 }

Response

Status code 200 Ok

[ { "id": "250b5e12-7b97-4ca1-9ffb-ff5f990a6643", "userId": "2e87b431-1717-4f12-882e-75fadb884f9e", "fullName": "2e87b431-1717-4f12-882e-75fadb884f9e_MyCoolDatabase", "name": "MyCoolDatabase", "creationDateUTC": "2020-01-21T06:30:56.418Z", "key": "7b1bc441-7dfe-4af4-8b5f-14eb14229f47" } ]

About : deletes and drops a database. Method : DELETE End point: ../api/databaseapi/delete Authrized JWT token
Request DELETE "../api/databaseapi/delete" Headers
  • id 250b5e12-7b97-4ca1-9ffb-ff5f990a6643

Response

Status code 200 OK

Records
About : get the list of records in a table. Method : GET End point: ../api/recordapi/records Authrized JWT token
Request GET "../api/recordapi/records" Body

{ "database" : "MyCoolDatabase", "table" : "CoolTable", "Filters" : "{Name : \"Foo\" }", "pagination" : "{\"CurrentPage\" : 1 ,\"FetchRecordCount\" :100 }" }

Note: You can get full list of mongo filter queries here

Response

Status code 200 Ok

[[{ "name": "_id", "value": "5e269aa0dd445a4decb8e7cb" }, { "name": "Name", "value": "Foo" }, { "name": "Type", "value": "Bar" }, { "name": "Custom", "value": [ { "name": "Key", "value": "OurKeyValue" }, { "name": "Number", "value": 1 }}]]

About : add a new record into a table. Method : POST End point: ../api/recordapi/create Authrized JWT token
Request POST "../api/recordapi/create" Body

{ "Database" : "MyCoolDatabase", "Table" : "CoolTable", "Data" : { "Name" : "Foo", "Type" :"Bar", "Custom" : { "Key" : "OurKeyValue", "Number" : 1}}}

Response

Status code 201 Created

[{ "name": "_id", "value": "5e269aa0dd445a4decb8e7cb" }, { "name": "Name", "value": "Foo" }, { "name": "Type", "value": "Bar" }, { "name": "Custom", "value": [ { "name": "Key", "value": "OurKeyValue" }, { "name": "Number", "value": 1 }]}]

About : updates a record or a group of records based on the filter. Method : PUT End point: ../api/recordapi/update Authrized JWT token
Request PUT "../api/recordapi/update" Body

{ "database" : "MyCoolDatabase", "table" : "CoolTable", "Filters" : "{Name : \"Foo\" }", "update" : "{$set : { Name : \"bar\"} }" }

Note: You can get full list of mongo update operators here

Response

Status code 200 OK

{ "isAcknowledged": true, "isModifiedCountAvailable": true, "matchedCount": 1, "modifiedCount": 1, "upsertedId": null }

About : deletes a record or a group of records based on the filter. Method : DELETE End point: ../api/recordapi/delete Authrized JWT token
Request DELETE "../api/recordapi/delete" Body

{ "database" : "MyCoolDatabase", "table" : "CoolTable", "Filters" : "{Name : \"Foo\" }

Note: You can get full list of mongo filter queries here

Response

Status code 200 OK

{ "deletedCount": 1, "isAcknowledged": true }