Skip to content

saikat0511/KIIT-SSS-API-serverless

Repository files navigation

KIIT SSS API

An API that scrapes KIIT SAP Student Self Service portal. Uses Serverless Application Model. Each resource uses a separate lambda function, and shared code is hosted on a lambda layer.

Live @ https://hj7xp13cu8.execute-api.ap-south-1.amazonaws.com/Prod/api/v1

Usage

Get login cookie: /cookie

Query parameters

Name Type
username Integer
password String

Example: Request

curl -X POST -H 'Content-Type: application/json' -d '{"username": xxxxxxx,"password":"YourPassword"}' https://hj7xp13cu8.execute-api.ap-south-1.amazonaws.com/Prod/api/v1/cookie

Example: Response

{
  "cookie": "MYSAPSSO2=cookievalue"
}

Get student info: /info

Query parameters

Name Type
cookie String

Example: Request

curl -X POST -H 'Content-Type: application/json' -d '{"cookie": "MYSAPSSO2=cookievalue"}' https://hj7xp13cu8.execute-api.ap-south-1.amazonaws.com/Prod/api/v1/info

Example: Response

{
  "school": "SCSE",
  "rollNo": "xxxxxxx",
  "name": "Your Name",
  "regNo": "xxxxxxxxxx",
  "program": "B.Tech.(Computer Science Engineering)",
  "semester": "4th Stage",
  "userImage": "http://link/to/your/pic.jpg"
}

Get attendance details: /attendance

Query parameters

Name Type
cookie String
year Integer
session String (Spring or Autumn)

Example: Request

curl -X POST -H 'Content-Type: application/json' -d '{"cookie": "MYSAPSSO2=cookievalue", "year": 2022, "session": "Spring"}' https://hj7xp13cu8.execute-api.ap-south-1.amazonaws.com/Prod/api/v1/attendance

Example: Response

{
  "subject": [ "Subject1", ... ],
  "presentCount": [ "37.00", ... ],
  "absentCount": [ "3.00", ... ],
  "dayCount": [ "40.00", ... ],
  "presentPercent": [ "92.50", ... ],
  "faculty": [ "Teacher1", ... ]
}

About

An API that scrapes KIIT SAP Student Self Service portal.

Resources

Stars

Watchers

Forks