{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "API", "description": "API para la aplicación de gestión de clases" }, "host": "localhost:5000", "basePath": "/", "schemes": [ "http" ], "paths": { "/api/schools/": { "get": { "description": "", "responses": { "200": { "description": "OK" } } }, "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "school_name": { "example": "any" }, "school_description": { "example": "any" }, "school_phone": { "example": "any" }, "school_address": { "example": "any" }, "school_image": { "example": "any" }, "school_email": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/schools/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } } }, "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/schools/coordinator/schools": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/courses/": { "get": { "description": "", "responses": { "200": { "description": "OK" } } }, "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_name": { "example": "any" }, "course_description": { "example": "any" }, "course_price": { "example": "any" }, "course_places": { "example": "any" }, "course_age": { "example": "any" }, "school_id": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/courses/school/{schoolId}": { "get": { "description": "", "parameters": [ { "name": "schoolId", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } } } }, "/api/courses/with-teachers": { "get": { "description": "", "responses": { "200": { "description": "OK" } } } }, "/api/courses/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } } }, "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_name": { "example": "any" }, "course_description": { "example": "any" }, "course_price": { "example": "any" }, "course_places": { "example": "any" }, "course_age": { "example": "any" }, "school_id": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/courses/{courseId}/students": { "get": { "description": "", "parameters": [ { "name": "courseId", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" } } } }, "/api/class/course/{course_id}/upcoming": { "get": { "description": "", "parameters": [ { "name": "course_id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" } } } }, "/api/class/": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_id": { "example": "any" }, "class_date": { "example": "any" }, "class_title": { "example": "any" }, "class_description": { "example": "any" }, "duration": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/class/course/{course_id}": { "get": { "description": "", "parameters": [ { "name": "course_id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" } } } }, "/api/class/{class_id}": { "put": { "description": "", "parameters": [ { "name": "class_id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "description": "", "parameters": [ { "name": "class_id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/users": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "user": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/login": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "user": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/api/forgot-password": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "email": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/reset-password": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "token": { "example": "any" }, "newPassword": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/me": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/users/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/my-courses": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/my-schools": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/coordinators": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/coordinators/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/coordinators/{id}/toggle-state": { "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/enroll/{schoolId}": { "post": { "description": "", "parameters": [ { "name": "schoolId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/administrators": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/administrators/{id}/toggle-state": { "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/users": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "user": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/login": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "user": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/forgot-password": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "email": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/reset-password": { "post": { "description": "", "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "token": { "example": "any" }, "newPassword": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/auth/me": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/users/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/my-courses": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/my-schools": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/coordinators": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/coordinators/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/coordinators/{id}/toggle-state": { "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/enroll/{schoolId}": { "post": { "description": "", "parameters": [ { "name": "schoolId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/administrators": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/auth/administrators/{id}/toggle-state": { "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/enrollments/courses/{courseId}/enroll": { "post": { "description": "", "parameters": [ { "name": "courseId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "start_date": { "example": "any" }, "end_date": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/enrollments/user/{userId}": { "get": { "description": "", "parameters": [ { "name": "userId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/courseteacher/assign": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_id": { "example": "any" }, "teacher_id": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/courseteacher/remove": { "delete": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_id": { "example": "any" }, "teacher_id": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/attendance/": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "class_id": { "example": "any" }, "user_id": { "example": "any" }, "status": { "example": "any" }, "notes": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/attendance/class/{class_id}": { "get": { "description": "", "parameters": [ { "name": "class_id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/attendance/student/{course_id}/{user_id}": { "get": { "description": "", "parameters": [ { "name": "course_id", "in": "path", "required": true, "type": "string" }, { "name": "user_id", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/courses": { "get": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/courses/{courseId}/students": { "get": { "description": "", "parameters": [ { "name": "courseId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/classes/course/{courseId}": { "get": { "description": "", "parameters": [ { "name": "courseId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/attendance/class/{classId}": { "get": { "description": "", "parameters": [ { "name": "classId", "in": "path", "required": true, "type": "string" }, { "name": "authorization", "in": "header", "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/attendance": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "class_id": { "example": "any" }, "user_id": { "example": "any" }, "status": { "example": "any" }, "notes": { "example": "any" } } } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } }, "/api/teacher/classes": { "post": { "description": "", "parameters": [ { "name": "authorization", "in": "header", "type": "string" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "course_id": { "example": "any" }, "class_date": { "example": "any" }, "class_title": { "example": "any" }, "class_description": { "example": "any" }, "duration": { "example": "any" } } } } ], "responses": { "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } } } }