Creates a supervisor.
Permissions
---- Permissions:INTEGRATOR,SUPERVISOR ----
Request Body Parameters
Parameter | Type | Description |
login | string (required) | Supervisor’s login |
password | string (required) | Supervisor’s password |
name | string (required) | Supervisor’s name |
gender | string (enum) | Supervisor’s gender – MALE or FEMALE . Default value: null |
unit | string (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' -i -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <integrator_token>' \ -d '{ "login" : "login", "password" : "password", "name" : "name", "gender" : "MALE", "photoUrl" : "photo url", "email" : "email", "unitId" : 1 }'
HTTP Request
POST /api/v1/supervisors HTTP/1.1 Content-Type: application/json Authorization: Bearer <integrator_token> Content-Length: 155 Host: localhost:8080 { "login" : "login", "password" : "password", "name" : "name", "gender" : "MALE", "photoUrl" : "photo url", "email" : "email", "unitId" : 1 }
Example of a Successful HTTP Response
HTTP/1.1 201 Created Content-Type: application/json Content-Length: 35 { "id" : 1, "login" : "login" }