/employee-data-platform

A data store app for fulfilling Cloud Computing Coursework Requirements

Primary LanguagePython

employee-data-platform

A data store app for fulfilling Cloud Computing Coursework Requirements

Tech Stack

SQL, Flask, Python

API

Vercel: https://employee-data-platform.vercel.app/

Azure: https://emp-data-app.azurewebsites.net/

URL Suffix Functions
/api/fetchall Displays all the data in JSON format
/api/fetchone Displays data in JSON format given an argument
/api/insert Inserts an employee record
/api/delete Deletes the employee record
/api/update Updates the employee record

Deploy Branch is deployed to the links mentioned above. Fetchone and fetchall functionalities are currently active and the rest are under development.

API Usage

  1. fetchall:

    send a GET request to
        https://employee-data-platform.vercel.app/api/fetchall
        or
        https://emp-data-app.azurewebsites.net/api/fetchall
    

    the data is returned in JSON format

  2. fetchone:

    send a POST request to 
        https://employee-data-platform.vercel.app/api/fetchone 
        or 
        https://emp-data-app.azurewebsites.net/api/fetchone
    

    Use content-type as JSON and send a JSON object of the following format:

    {
        "id": <insert employee id here>
    }
    
    
  3. insert:

    send a POST request to 
        https://employee-data-platform.vercel.app/api/insert 
        or 
        https://emp-data-app.azurewebsites.net/api/insert
    

    Use content-type as JSON and send a JSON object of the following format:

    {
        "city": <insert employee city here>,
        "country": <insert employee country here>,
        "date_of_birth": <insert employee dob here>,
        "department_id":  <insert department id here>,
        "department_name": <insert department name here>,
        "employee_role": <insert employee role here>,
        "employee_salary": <insert employee salary here>,
        "first_name": <insert employee first name here>,
        "gender": <insert employee gender here>,
        "house_no": <insert employee's house no. here>,
        "id": <insert employee id here>,
        "last_name": <insert employee last name here>,
        "pincode": <insert employee's pincode here>,
        "state": <insert employee's state here>,
        "street_name": <insert employee's street name here>
    }
    
  4. delete:

    send a POST request to 
        https://employee-data-platform.vercel.app/api/delete 
        or
        https://emp-data-app.azurewebsites.net/api/delete
    

    Use content-type as JSON and send a JSON object of the following format:

    {
        "id": <insert employee id to be deleted>
    }
    
  5. update:

    send a POST request to
        https://employee-data-platform.vercel.app/api/update 
        or
        https://emp-data-app.azurewebsites.net/api/update
    

    Use content-type as JSON and send a JSON object of the following format:

    {
        "id": <insert employee id to be deleted>
        <insert column to use> : <insert new value for column here>
    }