1. Overview

Microservice containing the business logic for managing labor-service.

Descriptions of these functions can be found in the section headers for each collection of relevant resources.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • labor-record-controller : Labor Record Controller

  • labor-type-controller : Labor Type Controller

2. Resources

2.1. Labor-record-controller

Labor Record Controller

2.1.1. Create Labor Record

POST /v1/laborRecords
Parameters
Type Name Description Schema

Body

laborRecordAddInfo
required

Details of the labor record to create

LaborRecordAddInfo

Responses
HTTP Code Description Schema

201

Created

LaborRecordInfo

400

Bad Request

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.1.2. Get labor records

GET /v1/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

Success

LaborRecordInfoResults

400

Bad Request

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.1.3. Get a labor record by id

GET /v1/laborRecords/{laborRecordId}
Parameters
Type Name Description Schema

Path

laborRecordId
required

Id of the labor record

integer (int64)

Responses
HTTP Code Description Schema

200

OK

LaborRecordInfoResult

400

Bad Request

HttpErrorResponse

401

Unauthorized

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.1.4. Update labor record

PUT /v1/laborRecords/{laborRecordId}
Parameters
Type Name Description Schema

Path

laborRecordId
required

Labor Record Id

integer (int64)

Body

laborRecordUpdateInfo
required

Update Labor Record

LaborRecordUpdateInfo

Responses
HTTP Code Description Schema

200

OK

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.1.5. Delete a labor record

DELETE /v1/laborRecords/{laborRecordId}
Parameters
Type Name Description Schema

Path

laborRecordId
required

Labor record Id to be deleted

integer (int64)

Responses
HTTP Code Description Schema

204

No Content

object

404

Not Found

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • /

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2. Labor-type-controller

Labor Type Controller

2.2.1. Get labor types

GET /v1/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

401

Unauthorized

No Content

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.2. Get a labor type by id

GET /v1/laborTypes/{LaborTypeId}
Parameters
Type Name Description Schema

Path

LaborTypeId
required

Id of the labor type

integer (int64)

Responses
HTTP Code Description Schema

200

OK

LaborTypeInfoResult

401

Unauthorized

HttpErrorResponse

404

Not Found

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. Error

Error details.

Name Description Schema

code
optional

string

details
optional

Details of the error.

object

3.2. HttpErrorResponse

Http Error response.

Name Description Schema

error
optional

Error details

Error

path
optional

URL at which error occured.

string

timestamp
optional

Timestamp at which error occured

string

3.3. 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.4. 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)

modifiedBy
optional

modified by for the labor record

string

modifiedOn
optional

modified on date/time for the labor record

string

reasonId
optional

reasonId for the labor record

integer (int64)

segmentActualId
optional

segment actual id of the labor record

integer (int64)

startTime
optional

start time for the labor record

string

userName
optional

user name for the labor record

string

3.5. LaborRecordInfoResult

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)

links
optional

< Link > array

modifiedBy
optional

modified by for the labor record

string

modifiedOn
optional

modified on date/time for the labor record

string

reasonId
optional

reasonId for the labor record

integer (int64)

segmentActualId
optional

segment actual id of the labor record

integer (int64)

startTime
optional

start time for the labor record

string

userName
optional

user name for the labor record

string

3.6. LaborRecordInfoResults

Name Schema

content
optional

< Resource«LaborRecordInfo» > array

links
optional

< Link > array

page
optional

PageMetadata

3.7. LaborRecordUpdateInfo

Labor Record update data tranfer object

Name Description Schema

appliedTime
required

applied time for the labor record

integer (int64)

3.8. LaborTypeInfo

Labor type data tranfer object

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)

name
optional

name for the labor type

string

3.9. LaborTypeInfoResult

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.10. LaborTypeInfoResults

Name Schema

content
optional

< Resource«LaborTypeInfo» > array

links
optional

< Link > array

page
optional

PageMetadata

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.12. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.13. Resource«LaborRecordInfo»

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)

links
optional

< Link > array

modifiedBy
optional

modified by for the labor record

string

modifiedOn
optional

modified on date/time for the labor record

string

reasonId
optional

reasonId for the labor record

integer (int64)

segmentActualId
optional

segment actual id of the labor record

integer (int64)

startTime
optional

start time for the labor record

string

userName
optional

user name for the labor record

string

3.14. Resource«LaborTypeInfo»

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

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.