- Download & install docker
- Turn on
Docker Desktop
- Copy source code from this repository to Your computer (
Code
->Download ZIP
-> Extract files) - Open the downloaded folder (with
.sln
anddocker-compose.yml
files) - In this folder, open preferred terminal (bash, cmd, PowerShell, etc.)
- Run
docker-compose up
- Wait until
employeeapi
container appears and starts up - For UI, in your browser, navigate to
http://localhost:5000/swagger/index.html
. Endpoints are listed below. - With Swagger UI, you should see Employee API
GET URI (get all employees)
http://localhost:5000/api/employees
GET URI (get employees by ID)
http://localhost:5000/api/employees/0b9dfe0a-8628-426a-a802-dc162331f1f6
POST URI & request body example in JSON (add new employee)
http://localhost:5000/api/employees
{
"firstName": "New",
"lastName": "Employee",
"birthDate": "2000-03-22T05:14:25.624Z",
"homeAddress": "string",
"currentSalary": 1000,
"positionName": "QA"
}
PUT URI & request body example in JSON (update existing employee)
{
"homeAddress": "Some address 123",
"currentSalary": 990,
"positionName": ProductOwner
}
DELETE URI (delete employee by ID)
http://localhost:5000/api/employees/f89b1b94-58dd-492a-bdb7-f9ceff13810f
GET URI (get all roles)
http://localhost:5000/api/roles
POST URI & request body example in JSON (add new role)
http://localhost:5000/api/roles
{
"position": "InformationAnalist",
"description": "Writes user stories for developers.",
"hoursPerWeek": 30
}
PUT URI & request body example in JSON (update role by ID)
http://localhost:5000/api/roles/598266ed-e6ad-4c0b-baaa-2b456fd0173c
{
"position": "QA",
"description": "Writes Web API tests and UI tests.",
"hoursPerWeek": 30
}
DELETE URI (delete role by ID)
http://localhost:5000/api/roles/598266ed-e6ad-4c0b-baaa-2b456fd0173c