Employees

Employee management

Options

Enable CORS by returning correct headers

SecurityNone
Responses
200

Enable CORS by returning correct headers

options/v1/employees

Get list of employees

Get a list of employees.

SecurityOAuth2 or JifelineAuthorizer
Request
query Parameters
offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer [ 0 .. 200 ]

The maximum number of items to return, the maximum numers of items to return is set to 200.

Example: limit=20
Responses
200

Employees

400

Returned when a client sends a bad request

401

Returned when a request is performed without or with an incorrect OIDC token

403

Returned when a client requests a resource it's not authorized for.

500

Returned when an error occurs on the server

get/v1/employees
Response samples
application/json
{
  • "total": 234,
  • "offset": 200,
  • "limit": 20,
  • "result": [
    ]
}

Add employee

Add a new employee.

SecurityOAuth2 or JifelineAuthorizer
Request
Request Body schema: application/json
required

Employee to create

given_name
required
string <= 255 characters

Given name of employee.

family_name
required
string <= 255 characters

Family name of employee.

username
required
string or null <email> [ 1 .. 255 ] characters

Username of employee. Once set it cannot be unset, only updated.

correspondence_locale
string <bcp47>

Locale used when sending correspondence to this employee. Only supported system locales are allowed.

Responses
201

Successfully added employee.

400

Returned when a client sends a bad request

401

Returned when a request is performed without or with an incorrect OIDC token

403

Returned when a client requests a resource it's not authorized for.

500

Returned when an error occurs on the server

post/v1/employees
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "given_name": "John",
  • "family_name": "Smith",
  • "username": "john.smith@my-garage.com",
  • "enabled": true,
  • "correspondence_locale": "en-GB"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "given_name": "John",
  • "family_name": "Smith",
  • "username": "john.smith@my-garage.com",
  • "enabled": true,
  • "correspondence_locale": "en-GB"
}

Options

Enable CORS by returning correct headers

SecurityNone
Request
path Parameters
required
string or string

Employee identifier.

Responses
200

Enable CORS by returning correct headers

options/v1/employees/{employeeId}

Get employee

Gets basic information of the employee like first-, family- and username. Using "me" as the employeeId will return this information for the currently logged-in employee.

SecurityOAuth2 or JifelineAuthorizer
Request
path Parameters
required
string or string

Employee identifier.

Responses
200

Successfully obtained employee

400

Returned when a client sends a bad request

401

Returned when a request is performed without or with an incorrect OIDC token

403

Returned when a client requests a resource it's not authorized for.

500

Returned when an error occurs on the server

get/v1/employees/{employeeId}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "given_name": "John",
  • "family_name": "Smith",
  • "username": "john.smith@my-garage.com",
  • "enabled": true,
  • "correspondence_locale": "en-GB"
}

Change employee

Change a new employee.

SecurityOAuth2 or JifelineAuthorizer
Request
path Parameters
required
string or string

Employee identifier.

Request Body schema: application/json
required

Properties to change.

given_name
required
string <= 255 characters

Given name of employee.

family_name
required
string <= 255 characters

Family name of employee.

username
required
string or null <email> [ 1 .. 255 ] characters

Username of employee. Once set it cannot be unset, only updated.

correspondence_locale
string <bcp47>

Locale used when sending correspondence to this employee. Only supported system locales are allowed.

Responses
200

Successfully changed employee.

400

Returned when a client sends a bad request

401

Returned when a request is performed without or with an incorrect OIDC token

403

Returned when a client requests a resource it's not authorized for.

500

Returned when an error occurs on the server

put/v1/employees/{employeeId}
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "given_name": "John",
  • "family_name": "Smith",
  • "username": "john.smith@my-garage.com",
  • "enabled": null,
  • "correspondence_locale": "en-GB"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "given_name": "John",
  • "family_name": "Smith",
  • "username": "john.smith@my-garage.com",
  • "enabled": true,
  • "correspondence_locale": "en-GB"
}