Access microservice (1.3.3)

Download OpenAPI specification:Download

This microservice is used to manage all the informations and processes about the user, like registration, login and changing informations

register

Let you register an user

Register an user in the system

Register an user, with the given informations, in the system

Request Body schema: application/protobuf.User

Data needed for register an user

email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "email": "string",
  "password": "string",
  "nome": "string",
  "cognome": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "email": "string",
  "password": "string",
  "nome": "string",
  "cognome": "string",
  "role": 0
}

login

Let you login in the system

Validate user credentials

Validate user credentials passed for logging in the system

Request Body schema: application/protobuf.User

Data needed for validate an user

email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "email": "string",
  "password": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Confirmed login.",
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

remove

Let you delete the created user

Remove an user

Remove a given user from the system

Request Body schema: application/protobuf.User

Data needed for remove an user

email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "email": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "User deleted."
}

utility

Let you get/change informations about the user

Get informations of an institute

Get informations of an institute

query Parameters
id
required
string

ID of the institute

Responses

Response samples

Content type
application/protobuf.Istituto
Example
{
  "ID": "integer",
  "IstitutoNome": "string",
  "IstitutoCitta": "string"
}

Get informations of all institutes

Get informations of all institutes

Responses

Response samples

Content type
application/protobuf.Response_Istituti
{
  "istituti": "proto.istituti[]"
}

Get informations of an institute

Get informations of an institute

query Parameters
istitutoNome
required
string

Name of the institute

istitutoCitta
required
string

City of the institute

Responses

Response samples

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

Verify if an user exists

Verify if an user exists, passing his email

query Parameters
email
required
string

Email of the user

Responses

Response samples

Content type
application/protobuf.User
{
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

Verify if an user have high privileges

Verify if an user exists, passed by email, have high privileges (Istituto, Owner)

query Parameters
email
required
string

Email of the user

Responses

Response samples

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

Verify if an user have Low privileges

Verify if an user exists, passed by email, have low privileges (Professor, Istituto, Owner)

query Parameters
email
required
string

Email of the user

Responses

Response samples

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

Change nome

Change the nome of a given user, passed by email

Request Body schema: application/protobuf.User
email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "email": "string",
  "name": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Confirmed change to name.",
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

Change cognome

Change the cognome of a given user, passed by email

Request Body schema: application/protobuf.User
email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "email": "string",
  "cognome": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Confirmed change to cognome.",
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

Change email

Change the email of a given user, passed by the old email

Request Body schema: application/protobuf.UserRequest_ChangeEmail
nuova_Email
string
user
object

Responses

Request samples

Content type
application/protobuf.UserRequest_ChangeEmail
{
  "new_Email": "string",
  "user": {
    "email": "string"
  }
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Confirmed change to email.",
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

Change password

Change the password of a given user, passed by the old email

Request Body schema: application/protobuf.User
email
string
password
string
nome
string
cognome
string
istituto
object
role
object
classe
string

Responses

Request samples

Content type
application/protobuf.User
{
  "user": {
    "email": "string",
    "password": "string"
  }
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Confirmed change to password.",
  "user": {
    "email": "string",
    "password": "string",
    "nome": "string",
    "cognome": "string",
    "istituto": {
      "ID": "integer",
      "IstitutoNome": "string",
      "IstitutoCitta": "string"
    },
    "role": "integer",
    "classe": "string"
  }
}

Change istituto

Change the istituto of a given user, passed by the email

Request Body schema: application/protobuf.PermissionRequest_ChangeInstitute
email_esecutore
string
email_utenteFinale
string
nuovo_istituto
object

Responses

Request samples

Content type
application/protobuf.PermissionRequest_ChangeInstitute
{
  "email_esecutore": "string",
  "email_utenteFinale": "string",
  "nuovo_istituto": "object"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Istituto changed successfully."
}

Change ruolo

Change the ruolo of a given user, passed by the email

Request Body schema: application/protobuf.PermissionRequest_ChangeRuolo
email_esecutore
string
email_utenteFinale
string
nuovo_ruolo
object

Responses

Request samples

Content type
application/protobuf.PermissionRequest_ChangeRuolo
{
  "email_esecutore": "string",
  "email_utenteFinale": "string",
  "nuovo_ruolo": "object"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Ruolo changed successfully."
}

Change classe

Change the classe of a given user, passed by the email

Request Body schema: application/protobuf.PermissionRequest_ChangeClasse
email_esecutore
string
email_utenteFinale
string
nuova_classe
string

Responses

Request samples

Content type
application/protobuf.PermissionRequest_ChangeClasse
{
  "email_esecutore": "string",
  "email_utenteFinale": "string",
  "nuova_classe": "string"
}

Response samples

Content type
application/protobuf.UserResponse
{
  "message": "Classe changed successfully."
}