Get an employee by ID

GET /employees/{id}

Returns the details of an employee based on the provided ID

Path parameters

  • id integer Required

    ID of the employee to retrieve

Responses

  • 404 */*

    Not Found

  • 200 application/json

    Successful operation

    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

GET /employees/{id}
curl \
 --request GET 'http://localhost:8080/employees/{id}'
Response examples (404)
string
Response examples (200)
{
  "id": 1234,
  "name": "Bilbo Baggins",
  "role": "Software Engineer"
}