No api request.
-
Route:
/sign-in -
Request:
POST -
Param:
{ "firstName": "..", "lastName": "..", "email": "..", "age": 123, "nationality": "..", "sex": "..", "password": "..", "salary": "...", "type": "renter/provider" } -
Response:
{ "status": true/false, "details": "..." }
-
Route:
/log-in -
Request:
POST -
Param:
{ "email": "..", "password": "..", "userType": "..." } -
Response:
{ "status": true/false, "token": "...", "userType": "...", "details": "..." }
-
Route:
/provide-house -
Request:
POST -
Param:
{ "houseInfo":{ "location": "", // string "size": 0, // number "startDate": "", // Date "endDate": "", // Date "description": "", // string "typeOfHouse": "", //string "age": 1233, "minPrice": 123, "bidPeriod": 111, "images": [ "url1", "url2" ], // Array<string> }, "token": "" // string } -
Response:
{ "status": true/false, "details": "...", }
-
Route:
/house-list -
Request:
GET -
Response:
{ "status": true/false, "houseInfoList": [ { "houseid": "", // string, housing "providerName": "", // string, to select "location": "", // string, housing "minPrice": 0, // number, housing "size": 0, // number, housing "sizeType": "", // number, to select "startDate": "", // Date, housing "endDate": "", // Date, housing "currentBid": "", // number, to select "description": "", // string, housing "type": "", // string "images": [ "url1", "url2" ], // Array<string>, not in db }, // ... ], "details": "..." }
-
Route:
/make-bid -
Request:
POST -
Param:
{ "houseid": "", // string "bid": 111, // number "token": "", // number "startDate": "", // Date "endDate": "", // Date "bidDate":"", // Date } -
Response:
{ "status": true/false, "details": "...", }
- Router:
/provider-info - Request:
POST - Param:
{
"houseID": 123 //number
}- Response
{
"status": true,
"details": "...",
"providerID" : 12, //number
"providerEmail": "qqq" // string
}- Route:
/bid-for-rental-provider - Request:
POST - Param:
{
"houseInfo":{
"asking price": 0, //string
"location": "", // string
"type": "", // string
"size": 0, // number
"location": "", // string
"startDate": "", // Date
"endDate": "", // Date
"maxbid": "", // number
"bidding period": 0,// number
"description": "", // string
"images": [
"url1",
"url2"
"url3"
"url4"
]
},
"token": "" // string
}
- Response:
{ "status": true/false, "details": "...", }
- Route:
/filter-for-houses - Request:
POST - Param:
{
"houseinfo": {
"location": "", // string
"type": [""], // string
"size": 1, // number
"maxPrice": 0, // number
"startDate": "", // date
"endDate": "" // date
},
"token": "" // string
}
- Response:
{
"status": true/false,
"houseInfoList": [
{
"houseid": "", // string, housing
"providerName": "", // string, to select
"location": "", // string, housing
"minPrice": 0, // number, housing
"size": 0, // number, housing
"sizeType": "", // number, to select
"startDate": "", // Date, housing
"endDate": "", // Date, housing
"currentBid": "", // number, to select
"description": "", // string, housing
"type": "", // string
"images": [
"url1",
"url2"
], // Array<string>, not in db
},
// ...
],
"details": "..."
}- Route:
/admin/table-name - Request:
GET - Param:
- Response:
{
"status": true/false,
"tableNameList": [],
"details": "..."
}- Router:
admin/attributes - Request:
POST - Param:
{
"tableNameList": ["tableName1"]
}- Response:
{
"status": true/false,
"tableAttributes":[
{
"name": "tableName1",
"attribute":[
{
"attributeName": "att1",
"type": "TEXT",
"count": [
{"value1": 9},
{"value2": 20},
],
},
{
"attributeName": "att2",
"type": "TEXT",
"count": [
{"value1": 9},
{"value2": 20},
],
}
],
},
{
"name": "tableName2",
"attribute":[
{
"attributeName": "att1",
"type": "TEXT",
"count": [
{"value1": 9},
{"value2": 20},
],
},
{
"attributeName": "att2",
"type": "NUMERIC",
"count": [
{"minValue": 9},
{"maxValue": 20}, // pay attention to the order
],
}
],
}
}
],
"details": "...",
}- Router:
admin/complex-query - Request:
POST - Param:
{
"fromTable": ["table1", "table2", "..."],
"joinOn":[
{
"table1": "att1",
"table2": "att2",
},
{
"table2": "att3",
"table3": "att1"
}
],
"filterEqual": {
"table1": [
{"att1": "value1"},
{"att1": "value3"},
{"att2": "value2"}
],
"table2": [
{"att1": "value1"},
{"att2": "value2"}
],
},
"filterLess": {
"table1": {
"att1": "value1",
"att2": "value2"
},
"table2": {
"att1": "value1",
"att2": "value2"
},
}
}- Response
{
"status": true,
"tableData": {
"columns": ["a","b","c"],
"rows": [
{"a":1,"b":2,"c":3},
{"a":4,"b":5,"c":6}
]
},
"details": "..."
}- Router:
admin/delete - Request:
POST - Param:
{
"entryInfo":{
"att1": "value1",
"att2": "value2",
...
}
}- Response:
{
"status": true,
"details": "..."
}- Router:
admin/update - Request:
POST - Param:
{
"orgRow":{
"att1": "value1",
"att2": "value2",
...
},
"newRow":{
"att1": "value1",
"att2": "value2",
...
}
}- Response:
{
"status": true,
"details": "..."
}- Router:
admin/add - Request:
POST - Param:
{
"entryInfo":{
"att1": "value1",
"att2": "value2",
...
}
}- Response:
{
"status": true,
"details": "..."
}