Server for Sardonyx
Sardonyx is an online solution to transform how high school students and teachers use technology to manage workloads. Sardonyx offers a cross-platfrom experience for all its users, through its mobile and web platforms. This repository contains code for Sardonyx's web application, targeted for computers and tablets.
The web application offers a group tasklist accessible by both teachers and students. Students and teachers benefit from the transparency of the workload, organized by due dates, subjects, and task categories. Each task on the list can be given a detailed description.
The Managebac integration is deprecated.
Navigate to sardonyx.app, then enter your credentials.
Sardonyx's Managebac API can be accessed at the following endpoints.
POST /login
Required: multipart form in request body with Sardonyx login
and password
GET /logout
Required: valid signed JWT cookie
POST /password
Required: valid signed JWT cookie with email and JSON request body in request body with new_password
GET /app/user
GET /app/user?tasklist=:tasklist
Note: Tasklists can be specified for retrieving default labels
Required: valid signed JWT cookie with email
property and tasklist
property or a tasklist
URL parameter
Returns: user
object
{
id: number,
name: string,
tasklist_id: number, // default tasklist
subjects: Array<number>, // default subjects
categories: Array<number> // default categories
}
Add default labels
POST /app/user/subjects?id=:id
POST /app/user/categories?id=:id
Remove default labels
DELETE /app/user/subjects?id=:id
DELETE /app/user/categories?id=:id
Required: valid signed JWT cookie with id
property and id
URL parameter (for label's id)
PATCH /app/user/tasklist?id=:id
Required: valid signed JWT cookie with id
property and id
URL parameter (for tasklist's id)
GET /app/tasklist
GET /app/tasklist?tasklist=:tasklist
GET /app/tasklist?tasklist=all
Note: To select all tasklists, pass all
as the tasklist URL parameter
Required: valid signed JWT cookie with tasklist
property or a tasklist
URL parameter
Returns: tasklist
object
{
id: number,
name: string,
description: string || null
}
GET /app/tasks
GET /app/tasks?tasklist=:tasklist
GET /app/tasks?full=true
To select labels associated with tasks, pass true for full
.
Required: valid signed JWT token with tasklist
property or a tasklist
URL parameter
Retuurns: tasks
object
[
{
id: number,
name: string,
description: string || null,
due: string || null, // ISODateString
teasklist_id: number || null,
user_id: number || null,
subject_id: number || null,
category_id: number || null,
managebac: string // URL to related managebac page
},
// ...
]
Create tasks
POST /app/task
Required: valid signed JWT cookie and JSON request body with task information
Edit tasks
PATCH /app/task?id=:id
Required: valid signed JWT cookie, id
URL parameter, and JSON request body with task information.
Delete tasks
DELETE /app/task?id=:id
Required: valid signed JWT cookie and id
URL parameter.
GET /app/subjects
GET /app/subjects?tasklist=:tasklist
GET /app/categories
GET /app/categories?tasklist=:tasklist
Required: valid signed JWT with tasklist
property or a tasklist
URL parameter
Returns: subjects
or categories
object
[
{
id: number,
name: string,
color: string, // length: 7
tasklist_id: number,
managebac: string // URL to related managebac class or group, subjects only
},
// ...
]
Add labels
POST /app/subjects
POST /app/categories
Required: valid signed JWT cookie and JSON request body with label information.
Edit labels
PATCH /app/subjects?id=:id
PATCH /app/categories?id=:id
Required: valid signed JWT cookie, id
URL paramter, JSON request body with label information
Delete labels
DELETE /app/subjects?id=:id
DELETE /app/categories?id=:id
Required: valid signed JWT cookie and id
URL parameter
For contribution, see CONTRIBUTING.md
in SardonyxApp/sardonyx repository.