ClassifAI API 1.0.0
ClassifAI API
Servers
Description | URL |
---|---|
Development server | localhost:5000 |
reports
GET /reports
Get all reports from all users (ADMIN)
Description
gets all reports from all registered users
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
GET /reports/users/{userId}
Get all reports created by this user
Description
Get all reports by owned by this user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
userId |
path | integer | No | ID of superfrog to return |
Response 200 OK
[
{
"flag": true,
"code": 200,
"message": "Find All Success",
"data": [
{
"usesrId": "johnnguyen",
"reportId": "senior design",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "senior_design_lecture"
},
{
"usesrId": "johnnguyen",
"reportId": "operating_systems",
"file": "OS_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "senior_design_lecture"
},
{
"usesrId": "johnnguyen",
"reportId": "DeepLearning",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "deep_learning_lecture"
}
]
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiResponseFindAllReportsByUser"
}
}
Response 400 Bad Request
Response 404 Not Found
GET /reports/{reportId}
Get a report by reportId
Description
get a report by reportId
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
reportId |
path | string | No | id of report |
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
POST /reports/{reportId}/users/{userId}
Add a new report created by this user
Description
Add a new report created by specified user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
reportId |
path | string | No | reportId is the reportName | |
userId |
path | string | No | userId owner of report |
Request body
{
"usesrId": "johnnguyen",
"reportId": "senior design",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "senior_design_lecture"
}
Schema of the request body
{
"allOf": [
{
"$ref": "#/components/schemas/Report"
}
],
"example": {
"usesrId": "johnnguyen",
"reportId": "senior design",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "senior_design_lecture"
}
}
Response 200 OK
{
"flag": true,
"code": 200,
"message": "Add Success",
"data": {
"usesrId": "johnnguyen",
"reportId": "DeepLearning",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "deep_learning_lecture"
}
}
Schema of the response body
{
"title": "API response for addReport",
"type": "object",
"properties": {
"flag": {
"type": "boolean",
"description": "Flag to indicate if the request was successful"
},
"code": {
"type": "integer",
"description": "HTTP status code",
"example": 200
},
"message": {
"type": "string",
"description": "Message to indicate if the request was successful",
"example": "Add Success"
},
"data": {
"allOf": [
{
"$ref": "#/components/schemas/Report"
}
],
"example": {
"usesrId": "johnnguyen",
"reportId": "DeepLearning",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "deep_learning_lecture"
}
}
}
}
Response 400 Bad Request
{
"flag": false,
"code": 400,
"message": "Provided arguments are invalid, see data for details.",
"data": {
"reportId": "reportId is required",
"userId": "userId is required",
"file": "file is required"
}
}
Schema of the response body
{
"title": "API response for bad request error",
"description": "The schema for bad request error",
"type": "object",
"properties": {
"flag": {
"title": "flag",
"description": "Success or not",
"type": "boolean",
"example": false,
"readOnly": true
},
"code": {
"title": "Http status code",
"description": "Http status code",
"type": "integer",
"example": 400,
"readOnly": true
},
"message": {
"title": "Message",
"description": "The long error message",
"type": "string",
"example": "Provided arguments are invalid, see data for details.",
"readOnly": true
},
"data": {
"$ref": "#/components/schemas/ReportFileBadRequest"
}
}
}
PUT /reports/{reportId}/users/{userId}
modify an existing report owned by user
Description
modify existing report created by the user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
reportId |
path | string | No | id of report | |
userId |
path | string | No | id of report |
Request body
{
"file": "os_lecture.mp4",
"fileName": "os_lecture"
}
Schema of the request body
{
"allOf": [
{
"$ref": "#/components/schemas/Report"
}
],
"example": {
"file": "os_lecture.mp4",
"fileName": "os_lecture"
}
}
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
DELETE /reports/{reportId}/users/{userId}
Deletes a report that the user created
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
reportId |
path | string | No | id of report | |
userId |
path | string | No | id of report |
Response 400 Bad Request
Response 404 Not Found
files
GET /files
Get all export data files from all users (ADMIN)
Description
gets all export data files from all registered users
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
GET /files/users/{userId}
Get all export data files created by user
Description
gets all export data files created by user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
userId |
path | string | No | id of user |
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
POST /files/reports/{reportId}/users/{userId}
Adds a new file tied to report
Description
Adds a new file with associated reportId and userId
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
reportId |
path | string | No | reportId is the reportName | |
userId |
path | string | No | userId owner of report |
Request body
{
"reportId": "seniorDesignReport",
"userId": "johnnguyen",
"file": "transcript.csv"
}
Schema of the request body
{
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"example": {
"reportId": "seniorDesignReport",
"userId": "johnnguyen",
"file": "transcript.csv"
}
}
Response 200 OK
{
"flag": true,
"code": 200,
"message": "Add Success",
"data": {
"usesrId": "johnnguyen",
"reportId": "DeepLearning",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "deep_learning_lecture"
}
}
Schema of the response body
{
"title": "API response for addReport",
"type": "object",
"properties": {
"flag": {
"type": "boolean",
"description": "Flag to indicate if the request was successful"
},
"code": {
"type": "integer",
"description": "HTTP status code",
"example": 200
},
"message": {
"type": "string",
"description": "Message to indicate if the request was successful",
"example": "Add Success"
},
"data": {
"allOf": [
{
"$ref": "#/components/schemas/Report"
}
],
"example": {
"usesrId": "johnnguyen",
"reportId": "DeepLearning",
"file": "senior_design_lecture.mp4",
"gradeLevel": "12",
"subject": "computer science",
"fileName": "deep_learning_lecture"
}
}
}
}
Response 400 Bad Request
{
"flag": false,
"code": 400,
"message": "Provided arguments are invalid, see data for details.",
"data": {
"reportId": "reportId is required",
"userId": "userId is required",
"file": "file is required"
}
}
Schema of the response body
{
"title": "API response for bad request error",
"description": "The schema for bad request error",
"type": "object",
"properties": {
"flag": {
"title": "flag",
"description": "Success or not",
"type": "boolean",
"example": false,
"readOnly": true
},
"code": {
"title": "Http status code",
"description": "Http status code",
"type": "integer",
"example": 400,
"readOnly": true
},
"message": {
"title": "Message",
"description": "The long error message",
"type": "string",
"example": "Provided arguments are invalid, see data for details.",
"readOnly": true
},
"data": {
"$ref": "#/components/schemas/ReportFileBadRequest"
}
}
}
PUT /files/{fileName}/reports/{reportId}/users/{userId}
modify an existing export data file
Description
modify an existing export data file owned by user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
fileName |
path | string | No | name of File | |
reportId |
path | string | No | id of report | |
userId |
path | string | No | id of user |
Response 200 OK
[
{
"userId": "johnnguyen",
"reportId": "myReport",
"file": "all.csv",
"gradeLevel": "12",
"subject": "music",
"fileName": "transcript"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Report"
}
}
Response 400 Bad Request
Response 404 Not Found
DELETE /files/{fileName}/reports/{reportId}/users/{userId}
Deletes an export data file
Description
Deletes an export data file associated with report created by user
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
fileName |
path | string | No | name of File | |
reportId |
path | string | No | id of report | |
userId |
path | string | No | id of report |
Response 400 Bad Request
Response 404 Not Found
Schemas
ApiResponseAddReport
Name | Type |
---|---|
code |
integer |
data |
|
flag |
boolean |
message |
string |
ApiResponseBadRequest
Name | Type |
---|---|
code |
integer |
data |
ReportFileBadRequest |
flag |
boolean |
message |
string |
ApiResponseFindAllReportsByUser
Name | Type |
---|---|
code |
integer |
data |
ReportList |
flag |
boolean |
message |
string |
ApiResponseFindReportById
Name | Type |
---|---|
code |
integer |
data |
|
flag |
boolean |
message |
string |
ApiResponseUpdateReport
Name | Type |
---|---|
code |
integer |
data |
|
flag |
boolean |
message |
string |
File
Name | Type |
---|---|
file |
string |
fileName |
string |
reportId |
string |
userId |
string |
Report
Name | Type |
---|---|
file |
string |
fileName |
string |
gradeLevel |
string |
reportId |
string |
subject |
string |
userId |
string |
ReportFileBadRequest
Name | Type |
---|---|
file |
string |
reportId |
string |
userId |
string |
ReportList
Type: Array<Report>
Security schemes
Name | Type | Scheme | Description |
---|---|---|---|
api_key | apiKey | ||
api_key_query | apiKey |
Tags
Name | Description |
---|---|
reports | What you can do relating to reports management as a logged in user. |
files | What you can do relating to export data files management as a logged in user. |
user | All user operations are handled by AWS Cognito |
sentences | legacy code operations to support assembly AI model get and save reports |
<> # Path: docs/swagger.yaml. Auto-generated from OpenAPI spec via https://www.neoteroi.dev/mkdocs-plugins/web/oad/