Updates a supervisor.
Permissions
---- Permissions:INTEGRATOR,SUPERVISOR ----
Path | Description |
userVariableName | Possible values: id/login – user variable |
Request Body Parameters
Parameter | Type | Description |
password | string (required) | Supervisor’s password |
name | string (required) | Supervisor’s name |
gender | string (enum) | Supervisor’s gender – MALE or FEMALE |
unit | long (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. |
email | string (optional) | Supervisor’s email address |
photoUrl | string (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