Create a new employee

POST /employees

Adds a new employee to the system

application/json

Body Required

  • name string

    Employee name

  • role string

    Employee role

Responses

  • 404 */*

    Not Found

  • 200 */*

    OK

    Hide response attributes Show response attributes object
    • id integer(int64)

      Unique identifier which should not be shared publicly

    • name string

      Employee name

    • role string

      Employee role

POST /employees
curl \
 --request POST 'http://localhost:8080/employees' \
 --header "Content-Type: application/json" \
 --data '{"name":"Bilbo Baggins","role":"Software Engineer"}'
Request examples
{
  "name": "Bilbo Baggins",
  "role": "Software Engineer"
}
Response examples (404)
string
Response examples (200)
{
  "id": 1234,
  "name": "Bilbo Baggins",
  "role": "Software Engineer"
}