Question 2. (2.5 marks)
List employees by department identifier as shown in Figure 2, with the following API
endpoint parameters:
URI:
http://localhost:9999/department/:departmentld
Method: GET
Output: Single object
Example: List employees with departmentld = "6706c540be090ec1c08abf87"
GET
http://localhost:9999/department/6706c540be090ec1c08abf87
Params
Authorization
Headers (7) Body Scripts
Tests
Settings
Query Params
Key
Value
Body Cookies Headers (7) Test Results
1
2
Pretty Raw Preview Visualize JSON
"department": "Human Resources","manager": "Emily Catherine Johnson",
3
4
"employees": [
5
{
6789
"id": "6706c546be090ec1c08abf89",
"fullName": "John Albert Doe"
},
{
10
"id": "6706c540be090ec1c08abf8c",
11
"fullName": "Alice B Smith"
12
}
13
14}
Zoom
Requirement:
+ 95%
Send
Cookies
Description
Bulk Edit
200 OK 18 ms 442 B
Q
Figure 2 - List of employees by departmentld
Close