API Documentation
/projects
Projects belong to companies and employees can work on them.
Endpoints
Method | Path |
---|---|
GET | / |
GET | /{id} |
GET | /search/findByIdentifier |
GET | /search/findByNameLikeIgnoreCaseOrIdentifierLikeIgnoreCaseOrderByNameAsc |
POST | / |
PUT | /{id} |
DELETE | /{id} |
Projections
Name | Description |
---|---|
withCompanyAndDebitor | The company and debitor of the project are embedded. |
Structure
Fieldname | Fieldtype | Validations |
---|---|---|
id | Long | |
version | Integer | |
identifier | String | not empty, unique |
name | String | not empty |
volume | Integer | > 0 |
hourlyRate | Number | > 0 |
dailyRate | Number | > 0 |
fixedPrice | Number | > 0 |
Links | Security | |
company | delete and update by ROLE_ADMIN | |
debitor | delete and update by ROLE_ADMIN | |
workTimes | delete and update by ROLE_ADMIN | |
billableTimes | delete and update by ROLE_ADMIN |
GET /▲
Get all projects.
Returns
A page of projects.
Parameters
pageableGET /{id}▲
Get a single project by its id.
Returns
One project.
GET /search/findByIdentifier▲
Find projects by their identifier.
Returns
A list of projects
Parameters
name | type | required | description |
---|---|---|---|
identifier | String | true | The project identifier to search for./**/ |
GET /search/findByNameLikeIgnoreCaseOrIdentifierLikeIgnoreCaseOrderByNameAsc▲
Search by name or identifier, ignoring their case with wildcards.
Returns
A list of projects.
Parameters
name | type | required | description |
---|---|---|---|
name | String | true | The name to search for. Wildcard is %. |
identifier | String | true | The identifier to search for. Wildcard is %. |
POST /▲
Create a new project. Returns the created object.
Security
ROLE_ADMIN
Returns
A single project.
PUT /{id}▲
Update the project identified by id. Returns the updated object.
Security
ROLE_ADMIN
Returns
A single project.
DELETE /{id}▲
Delete the project identified by id.
Security
ROLE_ADMIN
Returns
Nothing