Logs a user in either through processing their credentials (username and password) or by validating and refreshing their authentication token.
Authorization | string Authentication token previously issued by server, if applicable. |
Body to use when authenticating with username and password (i.e. token has not been previously issued or issued token has expired).
username | string |
password | string |
{- "username": "superuser",
- "password": "test"
}
{- "message": "OK"
}
Creates a new employee.
Details of the employee to create.
firstName | string |
lastName | string |
title | string |
salary | integer |
secLevel | integer |
permanent | boolean |
projects | Array of strings |
{- "id": "62273e66c62057b707d2df21",
- "firstName": "John",
- "lastName": "Appleseed",
- "title": "Senior Software Developer",
- "salary": 100000,
- "secLevel": 5,
- "permanent": true,
- "projects": [
- "Mastodon",
- "Hubbard"
]
}
{- "message": "OK"
}
Returns a list of all employees. Properties of the employee objects may be filtered away depending on user permissions and server configuration. All properties of the employee object should therefore be considered optional.
[- {
- "id": "62273e66c62057b707d2df21",
- "firstName": "John",
- "lastName": "Appleseed",
- "title": "Senior Software Developer",
- "salary": 100000,
- "secLevel": 5,
- "permanent": true,
- "projects": [
- "Mastodon",
- "Hubbard"
]
}
]
Updates the information of an employee.
id required | string Employee ID |
Properties to update. All properties are optional, and only the values of declared properties are changed.
firstName | string |
lastName | string |
title | string |
salary | integer |
secLevel | integer |
permanent | boolean |
projects | Array of strings |
{- "id": "62273e66c62057b707d2df21",
- "firstName": "John",
- "lastName": "Appleseed",
- "title": "Senior Software Developer",
- "salary": 100000,
- "secLevel": 5,
- "permanent": true,
- "projects": [
- "Mastodon",
- "Hubbard"
]
}
{- "message": "OK"
}
Registers a new user.
Details for the user to create.
username required | string |
password required | string |
{- "username": "string",
- "password": "string"
}
{- "message": "string",
- "token": "string"
}
[- {
- "id": "62273e66c62057b707d2df21",
- "username": "test-user",
- "permissions": [
- "read:employee.salary"
]
}
]