Skip to content

ValentinGuevara/MBAL-server-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API

URL

TO DO

LOGIN

  • URL

    </user/login>

  • Method:

    POST

  • Data Params

    Required:

    username=[string]

    password=[string]

  • Success Response:

    • Code: 200
      Content: { session_id : UYHJGF-457686-HKJKH }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

LOGOUT

  • URL

    </user/logout/{session_id}>

  • Method:

    GET

  • Data Params

    Required:

    session_id=[string]

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

CREATE USER

  • URL

    </user/create>

  • Method:

    POST

  • Data Params

    Required:

    name=[string] prenom=[string] mail=[string] password=[string] num_tel=[string] role=[string] -> USER

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

ACTIVATE USER

  • URL

    </user/activate/{id}>

  • Method:

    GET

  • Data Params

    Required:

    id=[string] -> present in mail sent

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

GET SESSION ID BY USER

  • URL

    </user/getSessionIdByUsername/{username}/> Le dernier / est important !

  • Method:

    GET

  • Data Params

    Required:

    username=[string] -> mail address

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

DELETE USER

  • URL

    </user/deleteUser>

  • Method:

    POST

  • Data Params

    Required:

    username=[string] -> mail address

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

UPDATE USER

  • URL

    </user/updateUser>

  • Method:

    POST

  • Data Params

    Required (blank if attribute not to be updated) :

    session_id=[string] -> actual session name=[string] prenom=[string] password=[string] numero_telephone=[string]

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

CHECK IF PASSWORD CORRECT

  • URL

    </user/checkIfPasswordCorrect>

  • Method:

    POST

  • Data Params

    Required :

    username=[string] -> mail address password=[string]

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

SET FAMILY OF USER

  • URL

    </user/setFamilyForUser>

  • Method:

    POST

  • Data Params

    Required :

    session_id=[string] -> actual session id name_family=[string] password_family=[string]

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

GET USER BY MAIL

  • URL

    </getUserByName/{username}/>

  • Method:

    GET

  • Data Params

    Required :

    username=[string]

  • Success Response:

    • Code: 200
      Content: JSON -> attribute : nom,prenom,mail,creation_date,numero_telephone, token_telephone,nom_photo_profil,isActivated, Family(name,creation_date)
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

GET USERS BY FAMILY ID

  • URL

    </user/getUsersByFamilyName/{family_name}>

  • Method:

    GET

  • Data Params

    Required :

    family_name=[String]

  • Success Response:

    • Code: 200
      Content: { JSON -> List of users }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

GET PROFILE PICTURE PATH FOR USER

  • URL

    </user/getPathProfilePicture/{session_id}>

  • Method:

    GET

  • Data Params

    Required :

    session_id=[string] -> actual session id

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

SET PROFILE PICTURE FOR USER

  • URL

    </user/setProfilePicture>

  • Method:

    POST

  • Data Params

    Required :

    session_id=[string] -> actual session id uploadfile=[File] -> Multipart File

  • Success Response:

    • Code: 200
      Content: { Response : String }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

GET PICTURE

  • URL

    </user/files/{filename}>

  • Method:

    GET

  • Data Params

    Required :

    filename=[String] -> name_profile_picture

  • Success Response:

    • Code: 200
      Content: { Picture To Download }
  • Error Response:

    • Code: 500 INTERNAL_SERVER_ERROR

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published