TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Get salary statistics overall and per department

GEThttps://api.testingapis.com/api/Employees/statsSign in to see this endpoint's URL

Responses

200
Totals, active count, average salary, and count/average/min/max salary per department.

Example

Request
curl -X GET "https://api.testingapis.com/api/Employees/stats" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "totalEmployees": 28,
  "activeEmployees": 26,
  "averageSalary": 175571.43,
  "departments": [
    {
      "department": "Design",
      "count": 2,
      "averageSalary": 110000,
      "minSalary": 86000,
      "maxSalary": 134000
    },
    {
      "department": "Engineering",
… (8 more lines)

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.