1. Overview
Microservice containing the business logic for managing templates of labor service definitions.
2. Resources
2.1. Labor-type-controller
Labor Type Controller
2.1.1. Get labor types
GET /v1/timeBooking/laborTypes
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
name |
name |
string |
|
Query |
page |
Minimum value 0 |
integer (int32) |
|
Query |
size |
Max value 2000 |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.2. Reasons-controller
Reasons Controller
2.2.1. Fetches reason tree nodes
GET /v1/reasons
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< ReasonTreeNodeDto > array |
400 |
Invalid data supplied. See message for details. |
|
401 |
Unauthorized |
|
404 |
Not found |
2.3. Time-booking-controller
Time Booking Controller
2.3.1. create labor records
POST /v1/timeBooking/laborRecords
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
404 |
Not Found |
|
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.3.2. Get labor records
GET /v1/timeBooking/laborRecords
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
endTime |
endTime |
string |
|
Query |
laborTypeId |
laborTypeId |
integer (int64) |
|
Query |
page |
Minimum value 0 |
integer (int32) |
|
Query |
size |
Max value 2000 |
integer (int32) |
|
Query |
startTime |
startTime |
string |
|
Query |
userName |
userName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.3.3. Update labor record
PUT /v1/timeBooking/laborRecords/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id |
integer (int64) |
Body |
updateLaborRecordReq |
updateLaborRecordReq |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied. See message for details. |
|
401 |
Unauthorized |
|
404 |
Not found |
|
409 |
Property definition with that name already exists on the propertyGroup |
|
412 |
Property definition has been updated since the GET on which the submitted changes were made. Response contains the current record. |
2.4. User-settings-controller
User Settings Controller
2.4.1. Create User settings for the logged in user
POST /v2/settings
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
204 |
No Content, Error retrieving created user settings |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
App ID not found in privilege set |
|
409 |
Conflict, User Setting already exists. Use a PUT to update |
|
500 |
Internal Server Error |
2.4.2. Get User settings for the logged in User
GET /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
appId |
appId |
integer (int32) |
Query |
viewName |
viewName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not found, no user setting found for the user |
|
500 |
Internal Server Error |
2.4.3. Update User settings for the logged in user
PUT /v2/settings
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not Found, There is no saved User settings for the logged in user |
|
500 |
Internal Server Error |
2.4.4. Delete User settings for the logged in user
DELETE /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
appId |
appId |
integer (int32) |
Query |
viewName |
viewName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
Success |
object |
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not Found, User Setting not found |
|
500 |
Internal Server Error |
2.4.5. Get Privilege Sets
GET /v2/settings/apps
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< PrivilegeSet > array |
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not found, no user setting found for the user |
|
500 |
Internal Server Error |
2.5. Users-controller
Users Controller
2.5.1. Get UAA Users
GET /v1/UAA/users
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
page |
Minimum value 0 |
integer (int32) |
|
Query |
size |
Max value 2000 |
integer (int32) |
|
Query |
username |
username |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.6. Work-order-controller
Work Order Controller
2.6.1. Get the work order details based on WorkOrder Name
GET /v1/workOrders
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WorkOrderInfo > array |
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.6.2. Get Machine name
GET /v1/workOrders/machine/{unitId}
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.6.3. Get segment names
GET /v1/workOrders/operations
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
laborTypeId |
laborTypeId |
integer (int64) |
|
Query |
lotIdentifier |
lotIdentifier |
string |
|
Query |
page |
Minimum value 0 |
integer (int32) |
|
Query |
size |
Max value 2000 |
integer (int32) |
|
Query |
workOrderId |
workOrderId |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.6.4. Get material actuals
GET /v1/workOrders/{workOrderId}/materialLotActuals
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
workOrderId |
workOrderId |
integer (int64) |
|
Query |
page |
Minimum value 0 |
integer (int32) |
|
Query |
size |
Max value 2000 |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
3. Definitions
3.4. LaborRecordAddInfo
Labor Record add data tranfer object
Name | Description | Schema |
---|---|---|
appliedTime |
applied time for the labor record |
integer (int64) |
endTime |
end time for the labor record |
string |
laborTypeId |
labor type id for the labor record |
integer (int64) |
reasonId |
reasonId for the labor record |
integer (int64) |
segmentActualId |
segment actual id of the labor record |
integer (int64) |
startTime |
start time for the labor record |
string |
userName |
user name for the labor record |
string |
3.5. LaborRecordInfo
Labor Record data tranfer object
Name | Description | Schema |
---|---|---|
appliedTime |
applied time for the labor record |
integer (int64) |
clockedTime |
Actual clockedTime of the operator |
integer (int64) |
createdBy |
created by for the labor record |
string |
createdOn |
created on date/time for the labor record |
string |
endTime |
end time for the labor record |
string |
id |
id of the labor record |
integer (int64) |
laborTypeId |
labor type id for the labor record |
integer (int64) |
machineName |
Machine Name |
string |
modifiedBy |
modified by for the labor record |
string |
modifiedOn |
modified on date/time for the labor record |
string |
operationName |
Operation Name |
string |
reasonId |
reason id for the labor record |
integer (int64) |
reasonName |
Reason Name |
string |
segmentActualId |
segment actual id of the labor record |
integer (int64) |
serialLotIdentifier |
Serial Lot Identifier |
string |
startTime |
start time for the labor record |
string |
userName |
user name for the labor record |
string |
workOrderName |
workOrder Name |
string |
3.6. LaborRecordUpdateInfo
Labor Record update data tranfer object
Name | Description | Schema |
---|---|---|
appliedTime |
applied time for the labor record |
integer (int64) |
laborTypeId |
labor type id for the labor record |
integer (int64) |
reasonId |
reasonId for the labor record |
integer (int64) |
3.7. LaborRecordsPage
Name | Schema |
---|---|
content |
< LaborRecordInfo > array |
links |
< Link > array |
page |
3.8. LaborTypeInfoResults
Name | Schema |
---|---|
content |
< ResourceLaborTypeInfo > array |
links |
< Link > array |
page |
3.9. Link
Name | Description | Schema |
---|---|---|
href |
string |
|
rel |
string |
|
templated |
Example : |
boolean |
3.10. MaterialLotActual
Represents a material lot produced by a work order and tracks its progress through operations and steps.
Name | Description | Schema |
---|---|---|
id |
Material Lot Actual ID. |
integer (int64) |
links |
Set of links on the resource. |
< Link > array |
lotIdentifier |
Lot Identifier provided with the work order request. Represents the serial number for serialized materials. |
string |
onHold |
True if the material lot actual is on hold. |
boolean |
parentIds |
Parent Material Lot Actual IDs. This is populated on child material lot actuals created when material lots are split or merged. This will be empty for material lot actuals with no parent. |
< integer (int64) > array |
plannedQuantity |
The planned quantity to produce for this material lot. |
integer (int32) |
status |
Status of the material lot. |
string |
workOrderId |
Work Order ID. |
integer (int64) |
3.11. MaterialLotActualPage
Contains a page of resources and the links required to navigate over pages.
Name | Description | Schema |
---|---|---|
content |
Set of resources on the page. |
< MaterialLotActual > array |
links |
Set of links on the resource. |
< Link > array |
page |
3.12. Operation
Provides information on an operation by extending the properties of a segment actual info with denormalized related data.
Name | Description | Schema |
---|---|---|
completedBy |
User that completed the segment actual. |
string |
completedOn |
Date that the segment actual was completed. |
string (date-time) |
completedQuantity |
Completed quantity for the operation. |
integer (int32) |
links |
Set of links on the resource. |
< Link > array |
lotIdentifier |
Lot identifier for material lot that the operation executes on. |
string |
lotPlannedQuantity |
Planned quantity for the material lot that the operation executes on. |
integer (int32) |
materialLotActualId |
ID of the material lot actual that the operation executes on. |
integer (int64) |
onHold |
Indicates whether the operation is currently on hold. |
boolean |
operationDescription |
Description of the operation |
string |
operationName |
Name of the operation |
string |
plannedUnitIds |
Reference to the unit that the operation is planned to execute on. |
< integer (int64) > array |
producedMaterialId |
Material produced by the Work order that this operation is part of. |
integer (int64) |
productionLineId |
Production line ID that the work order executes on. |
integer (int64) |
readyOn |
Date that the segment actual was made ready. |
string (date-time) |
segmentActualId |
ID of the segment actual for the operation. |
integer (int64) |
segmentId |
ID of the segment that the operation executes. |
integer (int64) |
startedBy |
User that started the segment actual. |
string |
startedOn |
Date that the segment actual was started. |
string (date-time) |
startedOnUnitId |
Reference to the unit that the operation is started on. |
integer (int64) |
status |
Status of the operation. |
string |
workOrderId |
ID of the work order that the operation is part of. |
integer (int64) |
workOrderName |
Name of the work order that the operation is part of. |
string |
workOrderPriority |
Relative priority of the work order. |
integer (int32) |
3.13. OperationPage
Contains a page of resources and the links required to navigate over pages.
Name | Description | Schema |
---|---|---|
content |
Set of resources on the page. |
< Operation > array |
links |
Set of links on the resource. |
< Link > array |
page |
3.14. PageMetadata
Page size and location information.
Name | Description | Schema |
---|---|---|
number |
Current page number. |
integer (int32) |
size |
Maximum number of resources on a page. |
integer (int32) |
totalElements |
Total number of resources in the paged collection. |
integer (int32) |
totalPages |
Total number of pages in the paged collection. |
integer (int32) |
3.15. PagedUsersListResult
Name | Schema |
---|---|
content |
< UsersListInfo > array |
links |
< Link > array |
page |
3.16. PrivilegeSet
Name | Schema |
---|---|
category |
string |
description |
string |
displayName |
string |
icon |
string |
id |
integer (int32) |
scope |
string |
3.17. ReasonTreeNodeDto
Name | Description | Schema |
---|---|---|
categoryId |
The categoryId of the reason |
integer (int64) |
categoryName |
The category name of reason |
string |
children |
The List of the reasonTreeNode |
< ReasonTreeNodeDto > array |
links |
< Link > array |
|
nodeId |
The Unique identifier of node |
integer (int64) |
parentNodeId |
The Unique identifier of parentNode |
integer (int64) |
reasonId |
The Unique identifier of reason |
integer (int64) |
reasonLevel |
The level can be 1-level1 2-level2 3-level3 4-level4 of reason |
integer (int32) |
reasonName |
The name of the reason |
string |
treeId |
The Unique identifier of tree |
integer (int64) |
3.18. ResourceLaborTypeInfo
Name | Description | Schema |
---|---|---|
createdBy |
created by for the labor type |
string |
createdOn |
created on date/time for the labor type |
string |
id |
id of the labor type |
integer (int64) |
links |
< Link > array |
|
name |
name for the labor type |
string |
3.19. Unit
Name | Description | Schema |
---|---|---|
assetId |
The asset ID |
integer (int64) |
isInventoryUnit |
Is this unit an inventory unit. A inventory unit is a storage unit. |
boolean |
isVirtual |
Is this unit a virtual unit. A virtual unit is a tracking unit. It doesn’t have physical assets associated with it. |
boolean |
lineId |
The line this unit belongs to |
integer (int64) |
links |
< Link > array |
|
name |
The name of the asset |
string |
type |
The type of the asset |
enum (Department, Line, Unit, Group, Variable, ProcessOrder) |
unitRank |
This unit’s rank |
integer (int32) |
units |
Collection of Groups belonging to this Unit |
3.20. UnitCollection
Name | Schema |
---|---|
collection |
|
content |
< Unit > array |
links |
< Link > array |
3.22. UserName
Name | Description | Schema |
---|---|---|
familyName |
familyName |
string |
givenName |
givenName |
string |
3.23. UserSettingRequest
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} } |
object |
viewName |
string |
3.24. UserSettingResource
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
object |
|
defaultSetting |
Example : |
boolean |
links |
< Link > array |
|
viewName |
string |
3.25. UsersListInfo
Name | Description | Schema |
---|---|---|
active |
The current status of the user |
boolean |
familyName |
familyName |
string |
givenName |
givenName |
string |
id |
The unique ID of the user |
string |
links |
< Link > array |
|
name |
The name of the user |
|
userId |
string |
|
userName |
The userName/login in of the user |
string |
4. Security
4.1. access_token
Type : oauth2
Flow : accessCode
Token URL : https://localhost/uaa/oauth/authorize
Token URL : https://localhost/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.2. resource_owner
Type : oauth2
Flow : password
Token URL : https://localhost/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.3. implicit_grant
Type : oauth2
Flow : implicit
Token URL : https://localhost/uaa/oauth/authorize
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.4. client_creds
Type : oauth2
Flow : application
Token URL : https://localhost/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |