Skip to content

Module: web app

Pranav Acharya edited this page Apr 7, 2022 · 1 revision

The web app is the entry point to the application for the user. On the first interaction user will be asked to log in using the google account i.e google authentication. When the authentication is completed, the user is redirected to the dashboard of the application. Where the user has the flexibility to choose which station, date, and time data he/she wishes to see on the map. Once the request is submitted, the list of user requests is seen in the table with the status of each request. When data is downloaded from the S3, the user will be able to see the data on the map as soon as it clicks on the show map.

GET /getAllInfo

Request:

    No parameters

Response:

{
    "station_name": ['DAN1', 'KABR', 'KABX', ...],
    "time": ['00:00:00 - 00:05:59', '00:06:00 - 00:11:59', ...],
    "property": [ 'Reflectivity']
}

GET /getAllStatus

Request:

{
    "user_email":"[email protected]"
}

Response:

{
    "error_code": "0",
    "error_message": "Information retrieved",
    "request_details": [
        {
            "_id": "6201ae94a0aa8bcdb7ad97bf",
            "user_email": "[email protected]",
            "request_id": "DAN1_02022022_000000_002959_Reflectivity",
            "status": "0",
            "time_stamp": "1644277396",
            "property": "Reflectivity",
            "__v": 0
        }
    ]
}

POST /postNewRequest

Request:

{
    “station_name” : "DAN1",
    “date” : "02-02-2022", 
    “time” : ”00:00:00 - 00:29:59”,
    “user_email” : "[email protected]",
    “property” : "Reflectivity"
}

Response:

{
    "response_code": "0",
    "response_message": "Information retrieved",
    "data_dump": [
        {
            "_id": "6201ae94a0aa8bcdb7ad97bf",
            "user_email": "[email protected]",
            "request_id": "DAN1_02022022_000000_002959_Reflectivity",
            "status": "0",
            "time_stamp": "1644277396",
            "property": "Reflectivity",
            "__v": 0
        }
    ],
    "data_status": "true/false"
}

POST /getDataOfRequestID

Request:

{
    "request_id" : "KAKQ_02012022_003000_005959_Reflectivity",
    "user_email" : "[email protected]",
    "property" : "Reflectivity"
}

Response:

{
    "response_code": "0",
    "response_message": "Information retrieved",
    "data": [
        {
            "_id": "6201af9ba0aa8bcdb7ad97f1",
            "request_id": "KAKQ_02012022_003000_005959_Reflectivity",
            "start_time": "003000",
            "end_time": "005959",
            "__v": 0,
            "lat": {
                "_id": "6201af9ba0aa8bcdb7ad97f2",
                "parent_doc_ref": "6201af9ba0aa8bcdb7ad97f1",
                "lat": [[],[]....],
                "__v": 0
            },
            "long": {
                "_id": "6201af9ba0aa8bcdb7ad97f3",
                "parent_doc_ref": "6201af9ba0aa8bcdb7ad97f1",
                "long": [[],[]....],
                "__v": 0
            },
            "reflectivity": {
                "_id": "6201af9ba0aa8bcdb7ad97f4",
                "parent_doc_ref": "6201af9ba0aa8bcdb7ad97f1",
                "data": [[],[]....],
                "__v": 0
            }
        }
    ]
}