Employees

This is the API Documentation for the /api/employees/ route.

Get ALL Employees

GET api/employees/

Responds with an Array of Employees

Get Employee

GET api/employees/:id

Path Parameters

Name
Type
Description

id*

String

The ID of the Employee

Returns an Employee object.

Insert Employee

POST api/employees/

Request Body

Name
Type
Description

forename*

String

The First Name of the Employee

surname*

String

The Family Name of the Employee

department*

Department

The Department of the Employee

password*

String

The account password

confirmPassword*

String

The users confirmation of the account password

Login as User

POST api/employees/login

Request Body

Name
Type
Description

email*

String

The e-mail for the User Account

password*

String

The plaintext password for the User Account

Encrypt Password

POST api/employees/generate-password

Encrypt a password using the API via BCrypt.

Request Body

Name
Type
Description

password*

String

The plaintext password for the User Account

Delete ALL Employees

DELETE api/employees/

Delete Employee

DELETE api/employees/:id

Path Parameters

Name
Type
Description

id*

String

The ID of the Employee

Edit Employee

PATCH api/employees/:id

Path Parameters

Name
Type
Description

id*

String

The ID of the Employee

Request Body

Name
Type
Description

forename*

String

The First Name of the Employee

surname*

String

The Family Name of the Employee

department*

Department

The Department of the Employee

Last updated