Update Supervisors

Updates a supervisor.

Permissions

  ----
  Permissions:INTEGRATOR,SUPERVISOR
  ----
PathDescription
userVariableNamePossible values: id/login – user variable

Request Body Parameters

ParameterTypeDescription
passwordstring (required)Supervisor’s password
namestring (required)Supervisor’s name
genderstring (enum)Supervisor’s gender – MALE or FEMALE
unitlong (optional)ID of the organization unit to which the supervisor belongs. For this parameter, you can use any item added to the organization_units table.
emailstring (optional)Supervisor’s email address
photoUrlstring (optional)Link to the supervisor’s photo

Curl Example

$ curl 'http://localhost:8080/api/v1/supervisors/1' -i -X PUT \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <integrator_token>' \
  -d '{
  "password" : "password",
  "name" : "name",
  "gender" : "FEMALE",
  "photoUrl" : "new photo",
  "email" : "email",
  "unitId" : 12
}'

HTTP Request

PUT /api/v1/supervisors/1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <integrator_token>
Content-Length: 137
Host: localhost:8080
{
  "password" : "password",
  "name" : "name",
  "gender" : "FEMALE",
  "photoUrl" : "new photo",
  "email" : "email",
  "unitId" : 12
}

Example of a Successful HTTP Response

HTTP/1.1 200 OK