1. Overview

Microservice containing the business logic for managing templates of labor service definitions.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • labor-type-controller : Labor Type Controller

  • reasons-controller : Reasons Controller

  • time-booking-controller : Time Booking Controller

  • user-settings-controller : User Settings Controller

  • users-controller : Users Controller

  • work-order-controller : Work Order Controller

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
optional

name

string

Query

page
optional

Minimum value 0

integer (int32)

0

Query

size
optional

Max value 2000

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

LaborTypeInfoResults

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

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.

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not found

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3. Time-booking-controller

Time Booking Controller

2.3.1. create labor records

POST /v1/timeBooking/laborRecords
Parameters
Type Name Description Schema

Body

laborRecordAddInfo
required

Create Labor Records

LaborRecordAddInfo

Responses
HTTP Code Description Schema

201

Created

LaborRecordInfo

400

Bad Request

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.2. Get labor records

GET /v1/timeBooking/laborRecords
Parameters
Type Name Description Schema Default

Query

endTime
optional

endTime

string

Query

laborTypeId
optional

laborTypeId

integer (int64)

Query

page
optional

Minimum value 0

integer (int32)

0

Query

size
optional

Max value 2000

integer (int32)

20

Query

startTime
optional

startTime

string

Query

userName
optional

userName

string

Responses
HTTP Code Description Schema

200

OK

LaborRecordsPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.3. Update labor record

PUT /v1/timeBooking/laborRecords/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Body

updateLaborRecordReq
required

updateLaborRecordReq

LaborRecordUpdateInfo

Responses
HTTP Code Description Schema

200

OK

LaborRecordInfo

400

Invalid data supplied. See message for details.

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not found

HttpErrorResponse

409

Property definition with that name already exists on the propertyGroup

HttpErrorResponse

412

Property definition has been updated since the GET on which the submitted changes were made. Response contains the current record.

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.4. Delete labor records

DELETE /v1/timeBooking/laborRecords/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

204

No Content

object

400

Bad Request

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4. User-settings-controller

User Settings Controller

2.4.1. Create User settings for the logged in user

POST /v2/settings
Parameters
Type Name Description Schema

Body

userSettingsRequest
optional

User Setting Object

UserSettingRequest

Responses
HTTP Code Description Schema

201

Created

UserSettingResource

204

No Content, Error retrieving created user settings

HttpErrorResponse

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

App ID not found in privilege set

HttpErrorResponse

409

Conflict, User Setting already exists. Use a PUT to update

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.2. Get User settings for the logged in User

GET /v2/settings
Parameters
Type Name Description Schema

Query

appId
required

appId

integer (int32)

Query

viewName
required

viewName

string

Responses
HTTP Code Description Schema

200

OK

UserSettingResource

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not found, no user setting found for the user

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.3. Update User settings for the logged in user

PUT /v2/settings
Parameters
Type Name Description Schema

Body

request
optional

User Preference Object

UserSettingRequest

Responses
HTTP Code Description Schema

200

OK

UserSettingResource

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not Found, There is no saved User settings for the logged in user

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.4. Delete User settings for the logged in user

DELETE /v2/settings
Parameters
Type Name Description Schema

Query

appId
required

appId

integer (int32)

Query

viewName
required

viewName

string

Responses
HTTP Code Description Schema

200

OK

object

204

Success

object

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not Found, User Setting not found

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.5. Get Privilege Sets

GET /v2/settings/apps
Parameters
Type Name Description Schema

Query

appName
optional

appName

string

Responses
HTTP Code Description Schema

200

OK

< PrivilegeSet > array

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not found, no user setting found for the user

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.5. Users-controller

Users Controller

2.5.1. Get UAA Users

GET /v1/UAA/users
Parameters
Type Name Description Schema Default

Query

page
optional

Minimum value 0

integer (int32)

0

Query

size
optional

Max value 2000

integer (int32)

20

Query

username
optional

username

string

Responses
HTTP Code Description Schema

200

OK

PagedUsersListResult

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.5.2. Get Logged in UAA User

GET /v1/UAA/users/loginuser
Parameters
Type Name Description Schema

Query

permissionScope
required

permissionScope

string

Responses
HTTP Code Description Schema

200

OK

User

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.6. Work-order-controller

Work Order Controller

2.6.1. Get the work order details based on WorkOrder Name

GET /v1/workOrders
Parameters
Type Name Description Schema

Query

workOrderName
required

workOrderName

string

Responses
HTTP Code Description Schema

200

OK

< WorkOrderInfo > array

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.6.2. Get Machine name

GET /v1/workOrders/machine/{unitId}
Parameters
Type Name Description Schema

Path

unitId
required

unitId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

Unit

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.6.3. Get segment names

GET /v1/workOrders/operations
Parameters
Type Name Description Schema Default

Query

laborTypeId
required

laborTypeId

integer (int64)

Query

lotIdentifier
required

lotIdentifier

string

Query

page
optional

Minimum value 0

integer (int32)

0

Query

size
optional

Max value 2000

integer (int32)

20

Query

workOrderId
required

workOrderId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

OperationPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.6.4. Get material actuals

GET /v1/workOrders/{workOrderId}/materialLotActuals
Parameters
Type Name Description Schema Default

Path

workOrderId
required

workOrderId

integer (int64)

Query

page
optional

Minimum value 0

integer (int32)

0

Query

size
optional

Max value 2000

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

MaterialLotActualPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

3. Definitions

3.1. CollectionMetadata

Name Schema

totalElements
optional

integer (int32)

3.2. Error

Name Schema

code
optional

string

details
optional

object

3.3. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.4. LaborRecordAddInfo

Labor Record add data tranfer object

Name Description Schema

appliedTime
optional

applied time for the labor record

integer (int64)

endTime
optional

end time for the labor record

string

laborTypeId
required

labor type id for the labor record

integer (int64)

reasonId
required

reasonId for the labor record

integer (int64)

segmentActualId
required

segment actual id of the labor record

integer (int64)

startTime
required

start time for the labor record

string

userName
required

user name for the labor record

string

3.5. LaborRecordInfo

Labor Record data tranfer object

Name Description Schema

appliedTime
optional

applied time for the labor record

integer (int64)

clockedTime
optional

Actual clockedTime of the operator

integer (int64)

createdBy
optional

created by for the labor record

string

createdOn
optional

created on date/time for the labor record

string

endTime
optional

end time for the labor record

string

id
optional

id of the labor record

integer (int64)

laborTypeId
optional

labor type id for the labor record

integer (int64)

machineName
optional

Machine Name

string

modifiedBy
optional

modified by for the labor record

string

modifiedOn
optional

modified on date/time for the labor record

string

operationName
optional

Operation Name

string

reasonId
optional

reason id for the labor record

integer (int64)

reasonName
optional

Reason Name

string

segmentActualId
optional

segment actual id of the labor record

integer (int64)

serialLotIdentifier
optional

Serial Lot Identifier

string

startTime
optional

start time for the labor record

string

userName
optional

user name for the labor record

string

workOrderName
optional

workOrder Name

string

3.6. LaborRecordUpdateInfo

Labor Record update data tranfer object

Name Description Schema

appliedTime
required

applied time for the labor record

integer (int64)

laborTypeId
optional

labor type id for the labor record

integer (int64)

reasonId
optional

reasonId for the labor record

integer (int64)

3.7. LaborRecordsPage

Name Schema

content
optional

< LaborRecordInfo > array

links
optional

< Link > array

page
optional

PageMetadata

3.8. LaborTypeInfoResults

Name Schema

content
optional

< ResourceLaborTypeInfo > array

links
optional

< Link > array

page
optional

PageMetadata

Name Description Schema

href
optional

string

rel
optional

string

templated
optional

Example : false

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
optional

Material Lot Actual ID.

integer (int64)

links
optional

Set of links on the resource.

< Link > array

lotIdentifier
optional

Lot Identifier provided with the work order request. Represents the serial number for serialized materials.

string

onHold
optional

True if the material lot actual is on hold.
Example : false

boolean

parentIds
optional

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
optional

The planned quantity to produce for this material lot.

integer (int32)

status
optional

Status of the material lot.

string

workOrderId
optional

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
optional

Set of resources on the page.

< MaterialLotActual > array

links
optional

Set of links on the resource.

< Link > array

page
optional

PageMetadata

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
optional

User that completed the segment actual.

string

completedOn
optional

Date that the segment actual was completed.

string (date-time)

completedQuantity
optional

Completed quantity for the operation.

integer (int32)

links
optional

Set of links on the resource.

< Link > array

lotIdentifier
optional

Lot identifier for material lot that the operation executes on.

string

lotPlannedQuantity
optional

Planned quantity for the material lot that the operation executes on.

integer (int32)

materialLotActualId
optional

ID of the material lot actual that the operation executes on.

integer (int64)

onHold
optional

Indicates whether the operation is currently on hold.
Example : false

boolean

operationDescription
optional

Description of the operation

string

operationName
optional

Name of the operation

string

plannedUnitIds
optional

Reference to the unit that the operation is planned to execute on.

< integer (int64) > array

producedMaterialId
optional

Material produced by the Work order that this operation is part of.

integer (int64)

productionLineId
optional

Production line ID that the work order executes on.

integer (int64)

readyOn
optional

Date that the segment actual was made ready.

string (date-time)

segmentActualId
optional

ID of the segment actual for the operation.

integer (int64)

segmentId
optional

ID of the segment that the operation executes.

integer (int64)

startedBy
optional

User that started the segment actual.

string

startedOn
optional

Date that the segment actual was started.

string (date-time)

startedOnUnitId
optional

Reference to the unit that the operation is started on.

integer (int64)

status
optional

Status of the operation.

string

workOrderId
optional

ID of the work order that the operation is part of.

integer (int64)

workOrderName
optional

Name of the work order that the operation is part of.

string

workOrderPriority
optional

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
optional

Set of resources on the page.

< Operation > array

links
optional

Set of links on the resource.

< Link > array

page
optional

PageMetadata

3.14. PageMetadata

Page size and location information.

Name Description Schema

number
optional

Current page number.

integer (int32)

size
optional

Maximum number of resources on a page.

integer (int32)

totalElements
optional

Total number of resources in the paged collection.

integer (int32)

totalPages
optional

Total number of pages in the paged collection.

integer (int32)

3.15. PagedUsersListResult

Name Schema

content
optional

< UsersListInfo > array

links
optional

< Link > array

page
optional

PageMetadata

3.16. PrivilegeSet

Name Schema

category
optional

string

description
optional

string

displayName
optional

string

icon
optional

string

id
optional

integer (int32)

scope
optional

string

3.17. ReasonTreeNodeDto

Name Description Schema

categoryId
optional

The categoryId of the reason

integer (int64)

categoryName
optional

The category name of reason

string

children
optional

The List of the reasonTreeNode

< ReasonTreeNodeDto > array

links
optional

< Link > array

nodeId
optional

The Unique identifier of node

integer (int64)

parentNodeId
optional

The Unique identifier of parentNode

integer (int64)

reasonId
optional

The Unique identifier of reason

integer (int64)

reasonLevel
optional

The level can be 1-level1 2-level2 3-level3 4-level4 of reason

integer (int32)

reasonName
optional

The name of the reason

string

treeId
optional

The Unique identifier of tree

integer (int64)

3.18. ResourceLaborTypeInfo

Name Description Schema

createdBy
optional

created by for the labor type

string

createdOn
optional

created on date/time for the labor type

string

id
optional

id of the labor type

integer (int64)

links
optional

< Link > array

name
optional

name for the labor type

string

3.19. Unit

Name Description Schema

assetId
optional

The asset ID

integer (int64)

isInventoryUnit
optional

Is this unit an inventory unit. A inventory unit is a storage unit.
Example : false

boolean

isVirtual
optional

Is this unit a virtual unit. A virtual unit is a tracking unit. It doesn’t have physical assets associated with it.
Example : false

boolean

lineId
optional

The line this unit belongs to

integer (int64)

links
optional

< Link > array

name
optional

The name of the asset

string

type
optional

The type of the asset

enum (Department, Line, Unit, Group, Variable, ProcessOrder)

unitRank
optional

This unit’s rank

integer (int32)

units
optional

Collection of Groups belonging to this Unit

UnitCollection

3.20. UnitCollection

Name Schema

collection
optional

CollectionMetadata

content
optional

< Unit > array

links
optional

< Link > array

3.21. User

Name Schema

userAuthorized
optional

boolean

userName
optional

string

3.22. UserName

Name Description Schema

familyName
optional

familyName

string

givenName
optional

givenName

string

3.23. UserSettingRequest

Name Description Schema

appId
optional

integer (int32)

data
optional

The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} }
Example : {
"AppKey1" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey2" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey3" : {
"property1" : { },
"property2" : { },
"property3" : { }
}
}

object

viewName
optional

string

3.24. UserSettingResource

Name Description Schema

appId
optional

integer (int32)

data
optional

object

defaultSetting
optional

Example : false

boolean

links
optional

< Link > array

viewName
optional

string

3.25. UsersListInfo

Name Description Schema

active
optional

The current status of the user
Example : false

boolean

familyName
optional

familyName

string

givenName
optional

givenName

string

id
optional

The unique ID of the user

string

links
optional

< Link > array

name
optional

The name of the user

UserName

userId
optional

string

userName
optional

The userName/login in of the user

string

3.26. WorkOrderInfo

WorkOrder data transfer object

Name Description Schema

id
optional

Unique Identifier for the WorkOrder

integer (int64)

name
optional

Name of the WorkOrder

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.