whit-colm / itsc-3155-group-project

[SP24 UNCC ITSC-3155:101] Group project monorepo
https://discord.gg/xDQ5zGkVu3
GNU Affero General Public License v3.0
0 stars 0 forks source link

API Endpoints documentation #6

Closed whit-colm closed 8 months ago

whit-colm commented 8 months ago

An outline of all endpoints which need to be made. These will be documented on the wiki with expected requests and responses.

Notes:

Current API version is askhole.api.dotfile.sh/v0alpha0, this won't be used in code, but in documentation it helps keep track of what's been updated when.

User classes

Permissions are broken into 3 levels; calls may return different information depending on the permission level of the authorization barer token.

  1. Students
  2. IAs - TAs and Tutors
  3. Instructors - Professors, teachers, and other higher order faculty.

Common Objects

Common objects aren't ever exposed themselves, but are used frequently enough throughout the documentation as to necessitate a definitive source in documentation

Object Endpoints

Objects aren't meant to be shown to the user directly, but are necessary to consume in other views. All objects will have a prefix /objs/.

User Endpoints

User endpoints are the primary way to get information which should be displayed directly to the user.

whit-colm commented 8 months ago

Testing badge colours:

raw code ```md - ![GET](https://img.shields.io/badge/GET%20%20-%20%2361AFFE?style=flat-square) `/url/` - ![POST](https://img.shields.io/badge/POST%20%20-%20%2349CC90?style=flat-square) `/url/` - ![PUT](https://img.shields.io/badge/PUT%20-%20%23FCA131?style=flat-square) `/url/` - ![PATCH](https://img.shields.io/badge/PATCH%20-%20%2350E3C2?style=flat-square) `/url/` - ![DELETE](https://img.shields.io/badge/DELETE%20-%20%23F93E3E?style=flat-square) `/url/` - ![HEAD](https://img.shields.io/badge/HEAD%20-%20%239012FE?style=flat-square) `/url/` - ![OPTIONS](https://img.shields.io/badge/OPTIONS%20-%20%230D5AA7?style=flat-square) `/url/` ```
whit-colm commented 8 months ago

fields that expect base64 will use a color coded logo B64

raw code ``` ![B64](https://img.shields.io/badge/B64%20-%20%23d33682?style=flat-square) ```
whit-colm commented 8 months ago

Reworked GET /objs/uid/ -> GET /objs/profile/; which also includes a few more fields if useful.

whit-colm commented 8 months ago

As of 19:07:49 EST, api version askhole.api.dotfile.sh/v0alpha0 is complete. Awaiting peer review.