Download OpenAPI specification:Download
Documentation for the Course Wright API
Create a new account
| firstName required | string |
| lastName required | string |
| email required | string |
| password required | string |
| repeatPassword required | string |
{- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "password": "string",
- "repeatPassword": "string"
}Sign into an account and recieve a jwt back along with a refresh token
| email required | string |
| password required | string |
{- "email": "string",
- "password": "string"
}{- "accessToken": "string",
- "user": {
- "id": "c1aa059a-1e25-4525-977c-9c405c0980de",
- "firstName": "John",
- "lastName": "Doe",
- "email": "johndoe@example.com",
- "type": "teacher",
- "dateCreated": "10-23-2022",
- "emailVerified": true,
- "title": "Mr"
}
}Return a list of courses associated with the user account.
| Authorization | string |
Specify whether or not the server should load the directories of the courses. This is a good idea if the courses are easily expandable and might be opened by the user. An example where you might not want to load the directories is when they are only displayed as lists.
| loadDirectories | boolean Default: true |
{- "loadDirectories": true
}[- {
- "id": "c1aa059a-1e25-4525-977c-9c405c0980de",
- "courseCode": "CS-1021",
- "affiliation": "none",
- "subject": "Computer Science",
- "license": "none",
- "date_created": "2038-01-19 03:14:07",
- "name": "Intro to Computer Science"
}
]Returns a fully loaded course object with all directories, pages, and cells.
| id required | string ID of course |
| Authorization | string Must contain Bearer with accessToken |
{- "id": "c1aa059a-1e25-4525-977c-9c405c0980de",
- "courseCode": "CS-1021",
- "affiliation": "none",
- "subject": "Computer Science",
- "license": "none",
- "date_created": "2038-01-19 03:14:07",
- "name": "Intro to Computer Science"
}Get a directory
| id required | string Directory ID |
| Authorization | string Must contain Bearer with accessToken |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}Delete a directory from the database.
| id required | string Directory ID |
| Authorization | string Must contain Bearer with accessToken |
Optionally specify whether or not the delete is permanent.
| permanent | boolean Default: false |
{- "permanent": false
}Create a new Directory
| Authorization | string Must contain Bearer with accessToken |
Body should contain entire directory object without id.
| id | string |
| name | string |
| courseId | string |
Array of objects or null (Page) |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}Update a directory
| Authorization | string Must contain Bearer with accessToken |
Include directory object with existing directory id.
| id | string |
| name | string |
| courseId | string |
Array of objects or null (Page) |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}Delete a course.
Must only be done by the account that created the course.
| id required | string ID of course |
| Authorization | string Must contain Bearer with accessToken |
Specify whether the delete is permanent.
| permanent | boolean Default: false |
{- "permanent": false
}Get a directory
| id required | string Directory ID |
| Authorization | string Must contain Bearer with accessToken |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}Delete a directory from the database.
| id required | string Directory ID |
| Authorization | string Must contain Bearer with accessToken |
Optionally specify whether or not the delete is permanent.
| permanent | boolean Default: false |
{- "permanent": false
}Create a new Directory
| Authorization | string Must contain Bearer with accessToken |
Body should contain entire directory object without id.
| id | string |
| name | string |
| courseId | string |
Array of objects or null (Page) |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}Update a directory
| Authorization | string Must contain Bearer with accessToken |
Include directory object with existing directory id.
| id | string |
| name | string |
| courseId | string |
Array of objects or null (Page) |
{- "id": "string",
- "name": "string",
- "courseId": "string",
- "pages": [
- {
- "id": "string",
- "type": "string",
- "directoryId": "string",
- "": [
- {
- "id": "string",
- "index": 0,
- "pageId": "string",
- "type": "string",
- "contents": {
- "cellId": "string",
- "textType": "string",
- "text": "string",
- "cell": {
- "cellId": "string",
- "text": "string",
- "language": "string"
}
}
}
]
}
]
}