Calendar microservice (1.0.10)

Download OpenAPI specification:Download

This microservice is used to manage all the informations and processes about calendars, including creation of a new one and creation/modify of existing lessons

create

Let you create lessons and calendar

Create a calendar in the system

Request Body schema: application/protobuf.Calendar
email_executor
string
Anno_Scolastico
string
Istituto
integer
Classe
string
ID
integer

Responses

Request samples

Content type
application/protobuf.Calendar
{
  "email_executor": "string",
  "Anno_Scolastico": "string",
  "Istituto": "integer",
  "Classe": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Calendar created successfully"
}

Create a lesson in the system

Request Body schema: application/protobuf.Lesson
Nome_lezione
string
Materia
integer
Professore
string
Ora_inizio
string
Ora_fine
string
Data_Inizio
string
Data_Fine
string
Giorno
string
ID_Calendario
integer

Responses

Request samples

Content type
application/protobuf.Lesson
{
  "email_executor": "string",
  "lesson": "protobuf.Lesson"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lesson created successfully"
}

Add a book to a lesson

Request Body schema: application/protobuf.BooksForLesson
email_executor
string
lesson
object
ISBNs
Array of strings

Responses

Request samples

Content type
application/protobuf.BooksForLesson
{
  "email_executor": "string",
  "lesson": "Lesson",
  "ISBNs": "string[]"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Books successfully added for the lesson"
}

delete

Let you delete lessons from the system

delete a lesson lesson

Request Body schema: application/protobuf.LessonActions
email_executor
string
lesson
object

Responses

Request samples

Content type
application/protobuf.LessonActions
{
  "email_executor": "string",
  "lesson": "Lesson"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lesson deleted successfully"
}

delete books assigned to a lesson

Request Body schema: application/protobuf.BooksForLesson
email_executor
string
lesson
object
ISBNs
Array of strings

Responses

Request samples

Content type
application/protobuf.BooksForLesson
{
  "email_executor": "string",
  "lesson": "Lesson",
  "ISBNs": "string[]"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Book successfully removed from the lesson"
}

delete all lessons of a professor in all calendars

query Parameters
email_executor
required
string
professor
required
string

Responses

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lessons deleted successfully"
}

delete all lessons of a professor in a calendar, passed by ID

Request Body schema: application/protobuf.DeleteLessonsOfProfessor
email_executor
string
professor
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.DeleteLessonsOfProfessor
{
  "email_executor": "string",
  "professor": "Lesson",
  "CalendarID": "profotbuf.CalendarID"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lessons deleted successfully"
}

delete all lessons of a professor in a calendar, passed by istituto name, city name, class and year

Request Body schema: application/protobuf.DeleteLessonsOfProfessor
email_executor
string
professor
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.DeleteLessonsOfProfessor
{
  "email_executor": "string",
  "professor": "Lesson",
  "CalendarExplicit": "profotbuf.CalendarExplicit"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lessons deleted successfully"
}

modify

Let you mofidy lessons informations

Change starting/ending date of a lesson

Request Body schema: application/protobuf.ChangeLessonPeriodDate
email_executor
string
lesson
object
nuovaInizioData
string
nuovaFineData
string

Responses

Request samples

Content type
application/protobuf.ChangeLessonPeriodDate
{
  "email_executor": "string",
  "lesson": "Lesson",
  "nuovaInizioData": "string",
  "nuovaFineData": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lesson deleted successfully"
}

Change the books of a lesson in a determinated period of time

Request Body schema: application/protobuf.ChangeLessonBookPeriodDate
email_executor
string
lesson
object
ISBNs
Array of strings
nuovaInizioData
string
nuovaFineData
string

Responses

Request samples

Content type
application/protobuf.ChangeLessonBookPeriodDate
{
  "email_executor": "string",
  "lesson": "Lesson",
  "ISBNs": "string[]",
  "nuovaInizioData": "string",
  "nuovaFineData": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Books changed successfully."
}

Change the lesson as absense in a determinate period of time

Request Body schema: application/protobuf.ChangeLessonPeriodDate
email_executor
string
lesson
object
nuovaInizioData
string
nuovaFineData
string

Responses

Request samples

Content type
application/protobuf.ChangeLessonPeriodDate
{
  "email_executor": "string",
  "lesson": "Lesson",
  "nuovaInizioData": "string",
  "nuovaFineData": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Lesson set as absence successfully."
}

Change the day of the lesson in a determinate period of time

Request Body schema: application/protobuf.ChangeLessonDay
email_executor
string
lesson
object
nuovoGiorno
string
nuovaInizioData
string
nuovaFineData
string

Responses

Request samples

Content type
application/protobuf.ChangeLessonDay
{
  "email_executor": "string",
  "lesson": "Lesson",
  "nuovoGiorno": "string",
  "nuovaInizioData": "string",
  "nuovaFineData": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Successfully changed date to lesson"
}

Change the hours of the lesson in a determinate period of time

Request Body schema: application/protobuf.ChangeLessonHours
email_executor
string
lesson
object
nuovaInizioData
string
nuovaFineData
string
nuovaOraInizio
string
nuovaOraFine
string

Responses

Request samples

Content type
application/protobuf.ChangeLessonHours
{
  "email_executor": "string",
  "lesson": "Lesson",
  "nuovoGiorno": "string",
  "nuovaInizioData": "string",
  "nuovaFineData": "string",
  "nuovaOraInizio": "string",
  "nuovaOraFine": "string"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "Successfully changed time to lesson"
}

utility

Let you get lessons informations

Get all professor informations

query Parameters
email
required
string
year
required
string

Responses

Response samples

Content type
application/protobuf.UserInformations
{
  "email": "string",
  "nome": "string",
  "cognome": "string",
  "classes": "string[]",
  "subjects": "string[]",
  "institutesName": "string[]",
  "institutesCitta": "string[]"
}

Get all student informations

query Parameters
email
required
string
year
required
string

Responses

Response samples

Content type
application/protobuf.UserInformations
{
  "email": "string",
  "nome": "string",
  "cognome": "string",
  "classes": "string",
  "subjects": "string[]",
  "institutesName": "string",
  "institutesCitta": "string"
}

Get all the lessons that are present in a given date, using the Calendar ID

Request Body schema: application/protobuf.LessonInDate
date
string
giorno
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.LessonInDate
{
  "date": "string",
  "giorno": "string",
  "CalendarID": "protobuf.CalendarID"
}

Response samples

Content type
application/protobuf.Lessons
{
  "Lessons": "object"
}

Get all the lessons that are present in a determinate date, using the calendar informations

Request Body schema: application/protobuf.LessonInDate
date
string
giorno
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.LessonInDate
{
  "date": "string",
  "giorno": "string",
  "CalendarExplicit": "protobuf.CalendarExplicit"
}

Response samples

Content type
application/protobuf.Lessons
{
  "Lessons": "object"
}

Get all books ISBNs for the lessons presents in a determinate date, using the calendar ID

Request Body schema: application/protobuf.LessonInDate
date
string
giorno
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.LessonInDate
{
  "date": "string",
  "giorno": "string",
  "CalendarID": "protobuf.CalendarID"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message2": "object"
}

Get all books ISBNs in a date given the calendar informations

Request Body schema: application/protobuf.LessonInDate
date
string
giorno
integer
CalendarID
object
CalendarExplicit
object

Responses

Request samples

Content type
application/protobuf.LessonInDate
{
  "date": "string",
  "giorno": "string",
  "CalendarExplicit": "protobuf.CalendarExplicit"
}

Response samples

Content type
application/protobuf.BasicMessage
{
  "message2": "object"
}

Get all the lessons of a student in a determinate year

query Parameters
email
required
string
year
required
string

Responses

Response samples

Content type
application/protobuf.Lessons
{
  "Lessons": "object"
}

Get all the lessons of a professor in a determinate year, considering all institutes and classed that he have

query Parameters
email
required
string
year
required
string

Responses

Response samples

Content type
application/protobuf.Lessons
{
  "Lessons": "object"
}

Get all the lessons of a professor in a determinate year, considering all institutes and classed that he have

Request Body schema: application/protobuf.Lesson
Nome_lezione
string
Materia
integer
Professore
string
Ora_inizio
string
Ora_fine
string
Data_Inizio
string
Data_Fine
string
Giorno
string
ID_Calendario
integer

Responses

Response samples

Content type
application/protobuf.BasicMessage
{
  "message2": "string[]"
}

Get all the years that are already presents in the calendar of all institutes

Responses

Response samples

Content type
application/protobuf.BasicMessage
{
  "message2": "string[]"
}

Get all the subjects available

Responses

Response samples

Content type
application/protobuf.Subjects
{
  "subjects": "object[]"
}

Get all the lessons in a determinated calendar

query Parameters
classe
required
string
year
required
string
istitutoNome
required
string
istitutioCitta
required
string

Responses

Response samples

Content type
application/protobuf.Lessons
{
  "Lessons": "object"
}

Get the class given a lesson

Request Body schema: application/protobuf.Lesson
Nome_lezione
string
Materia
integer
Professore
string
Ora_inizio
string
Ora_fine
string
Data_Inizio
string
Data_Fine
string
Giorno
string
ID_Calendario
integer

Responses

Response samples

Content type
application/protobuf.BasicMessage
{
  "message": "string"
}