Skip to content

Latest commit

 

History

History
52 lines (46 loc) · 1.26 KB

report.org

File metadata and controls

52 lines (46 loc) · 1.26 KB

Report Docs

Prerequisite

The client should authenticated sucessfuly before accessing the endpoints below.

POST /report

Adds a new report, can only be requested by a cluster head.

Request Headers

Authorization: "Bearer <id_token>"⠀

Request Body

{
  "title": "<self_explanatory>",
  "date": "<date_in_yyyy-mm-dd_format>",
  "venue": "<self_explanatory>",
  "report": "<report_text>",
}

Response Format

Returns the newly created response, id is an integer.

{
  "id": 1,
  "title": "<self_explanatory>",
  "date": "<date_in_yyyy-mm-dd_format>",
  "venue": "<self_explanatory>",
  "report": "<report_text>",
  "report_date": "<date_report_was_added_in_yyyy-mm-dd_format>",
  "submitted_by": "<user_details>",
}

GET /reports

Returns all reports, only available of the team lead.

Request Headers

Authorization: "Bearer <id_token>"⠀

Repsonse Format

Returns an array of report with each elemnts has following schema:

{
  "id": 1,
  "title": "<self_explanatory>",
  "date": "<date_in_yyyy-mm-dd_format>",
  "venue": "<self_explanatory>",
  "report": "<report_text>",
  "report_date": "<date_report_was_added_in_yyyy-mm-dd_format>",
  "submitted_by": "<user_details>",
}