1. Overview

Microservice containing the business logic for managing inspection-service. Descriptions of these functions can be found in the section headers for each collection of relevant resources.

1.1. Version information

Version : 1.0

1.2. URI scheme

Host : localhost
BasePath : /

1.3. Tags

  • material-lot-controller : Material Lot Controller

  • receiver-material-lots-controller : Receiver Material Lots Controller

  • sample-material-lot-controller : Sample Material Lot Controller

  • test-material-lot-controller : Test Material Lot Controller

  • units-controller : Units Controller

  • variables-controller : Variables Controller

1.4. Produces

  • application/json

2. Resources

2.1. Material-lot-controller

Material Lot Controller

2.1.1. Validating the MaterialLot Names sent for a given Planned Unit Id

POST /v1.0/materialLots/validate
Parameters
Type Name Description Schema

Body

validationRequestInfo
required

validationRequestInfo

ValidationRequestInfo

Responses
HTTP Code Description Schema

200

OK

ValidationResponse

400

Bad data

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.1.2. updateMaterialLotQuantity

PUT /v1.0/materialLots/{materialLotId}
Parameters
Type Name Description Schema

Path

materialLotId
required

materialLotId

integer (int64)

Body

updateInfo
required

updateInfo

MaterialLotUpdateRequestInfo

Responses
HTTP Code Description Schema

200

OK

MaterialLotUpdateInfo

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.1.3. Update the final dimension x and status based on disposition type

PUT /v1.0/materialLots/{materialLotId}/disposition
Parameters
Type Name Description Schema

Path

materialLotId
required

materialLotId

integer (int64)

Body

dispositionInfoList
required

dispositionInfoList

< DispositionInfo > array

Responses
HTTP Code Description Schema

200

OK

string

400

Bad Request

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • 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.2. Receiver-material-lots-controller

Receiver Material Lots Controller

2.2.1. Get All MaterialLots

GET /v1.0/receiverMaterialLots
Parameters
Type Name Description Schema Default

Query

searchText
optional

searchText

string

Query

status
optional

status

enum (OPEN, CLOSE)

"Open"

Responses
HTTP Code Description Schema

200

OK

< ReceiverMaterialLots > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.2.2. Get MaterialLots Based on materialLotIds. This is an NC specific end endpoint

GET /v1.0/receiverMaterialLots/materialLots
Parameters
Type Name Description Schema Default

Query

materialLotIds
optional

materialLot id to filter recevicer material lots

< integer (int64) > array(multi)

Query

page
optional

page

integer (int32)

0

Query

size
optional

size

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

< MaterialLots > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.2.3. Get Material Lots of a Receiver. This is an NC specific end endpoint

GET /v1.0/receiverMaterialLots/nonconformance/{receivernumber}
Parameters
Type Name Description Schema

Path

receivernumber
required

Receiver Number

string

Responses
HTTP Code Description Schema

200

Success

< MaterialLotsInfoNC > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.2.4. Get All productionStatus

GET /v1.0/receiverMaterialLots/productionStatus
Responses
HTTP Code Description Schema

200

OK

< ProductionStatus > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.2.5. Get Receivers by search

GET /v1.0/receiverMaterialLots/receiversSearch
Parameters
Type Name Description Schema Default

Query

searchText
optional

searchText

string

Query

status
optional

status

enum (OPEN, CLOSE)

"Open"

Responses
HTTP Code Description Schema

200

OK

< ReceiverInfo > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.2.6. Get All MaterialLots Based on receiverId

GET /v1.0/receiverMaterialLots/{receiverId}
Parameters
Type Name Description Schema

Path

receiverId
required

receiverId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< ReceiverMaterialLots > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.3. Sample-material-lot-controller

Sample Material Lot Controller

2.3.1. Create sample material lot

POST /v1.0/samples
Parameters
Type Name Description Schema

Body

sampleMaterialLotInfo
required

sampleMaterialLotInfo

SampleMaterialLotInfo

Responses
HTTP Code Description Schema

201

Created

SampleMaterialLotResult

400

Invalid data

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

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.3.2. Get Samples By MaterialLot Ids

GET /v1.0/samples
Parameters
Type Name Description Schema

Query

materialLotIds
required

materialLotIds with comma separated

string

Responses
HTTP Code Description Schema

200

OK

< RetrieveSamplesInfo > array

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

500

Internal server error

No Content

503

Service Unavailable

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.3.3. Update sample material lot

PUT /v1.0/samples/{sampleId}
Parameters
Type Name Description Schema

Path

sampleId
required

sampleId

integer (int64)

Body

sampleUpdateInfo
required

Sample Description

SampleMaterialLotUpdateInfo

Responses
HTTP Code Description Schema

200

OK

SampleMaterialLotResult

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal server error

No Content

503

Service Unavailable

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

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.3.4. Delete Sample

DELETE /v1.0/samples/{sampleId}
Parameters
Type Name Description Schema

Path

sampleId
required

sampleId

integer (int64)

Responses
HTTP Code Description Schema

204

No Content

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal server error

No Content

503

Service Unavailable

HttpErrorResponse

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4. Test-material-lot-controller

Test Material Lot Controller

2.4.1. Create test

POST /v1.0/tests
Parameters
Type Name Description Schema

Body

testMaterialLotInfo
required

testMaterialLotInfo

TestMaterialLotInfo

Responses
HTTP Code Description Schema

201

Created

TestMaterialLotResult

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

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 Tests

GET /v1.0/tests
Parameters
Type Name Description Schema

Query

resultOn
required

resultOn

string

Responses
HTTP Code Description Schema

200

OK

< TestMaterialLotInfoWrapper > array

400

BadRequest

No Content

401

Unauthorized

No Content

403

Forbidden, Authenticated user is not known by MES

No Content

404

Not Found

No Content

500

Internal server error

No Content

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 test

PUT /v1.0/tests/{testId}
Parameters
Type Name Description Schema

Path

testId
required

testId

integer (int64)

Body

testMaterialLotInfo
required

testMaterialLotInfo

TestMaterialLotInfo

Responses
HTTP Code Description Schema

200

OK

TestMaterialLotResult

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

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.5. Units-controller

Units Controller

2.5.1. Retrieving All transaction statuses for a given Unit ID and Status ID (Optional)

GET /v1.0/units/{unitId}/prodExecutionTransitions
Parameters
Type Name Description Schema

Path

unitId
required

unitId

integer (int64)

Query

statusIds
optional

statusIds

string

Responses
HTTP Code Description Schema

200

OK

TransactionStatus

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.6. Variables-controller

Variables Controller

2.6.1. Get Variables

GET /v1.0/variables
Parameters
Type Name Description Schema

Query

materialId
optional

materialId

integer (int64)

Query

unitId
required

unitId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< Variables > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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.6.2. Get DataTypes

GET /v1.0/variables/dataTypes
Responses
HTTP Code Description Schema

200

OK

< DataTypes > array

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

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

3. Definitions

3.1. DataTypes

Name Schema

dataTypeDescription
optional

string

id
optional

integer (int64)

3.2. DispositionInfo

Name Schema

dispositionType
optional

string

quantity
optional

number (float)

3.3. Error

Error details.

Name Description Schema

code
optional

string

details
optional

Details of the error.

object

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

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.6. MaterialLotUpdateInfo

Name Description Schema

eventId
required

eventId

integer (int64)

eventNum
required

event_num

string

finalDimensionx
required

finalDimensionx

number (float)

initialDimensionx
required

initialDimensionx

number (float)

3.7. MaterialLotUpdateRequestInfo

Name Description Schema

quantity
required

quantity

number (float)

3.8. MaterialLots

Name Schema

commentId
optional

integer (int64)

isSerialized
optional

boolean

lineId
optional

integer (int64)

lotIdentifier
optional

string

materialLotStatus
optional

string

materialLotStatusId
optional

integer (int64)

materialLotsEntryOn
optional

string

productId
optional

integer (int64)

quantity
optional

integer (int64)

receiverId
optional

integer (int64)

receiverNumber
optional

string

targetEventId
optional

integer (int64)

unitId
optional

integer (int64)

3.9. MaterialLotsInfoNC

Name Schema

eventId
optional

integer (int64)

eventNum
optional

string

unitId
optional

integer (int64)

3.10. ProductionStatus

Name Schema

colorId
optional

integer (int64)

iconId
optional

integer (int64)

id
optional

integer (int64)

lifeCycleStage
optional

integer (int64)

prodStatusDesc
optional

string

prodStatusDescLocal
optional

string

3.11. ReceiverInfo

Name Schema

productCode
optional

string

productId
optional

integer (int64)

receiverNumber
optional

string

receiverStatus
optional

string

sourceEventId
optional

integer (int64)

3.12. ReceiverMaterialLots

Name Description Schema

materialLots
optional

< MaterialLots > array

receiverNumber
optional

receiverNumber

string

receiverStatus
optional

receiverStatus

string

receiverStatusId
optional

receiverStatusId

integer (int64)

receiverUnitId
optional

receiverUnitId

integer (int64)

sourceEventId
optional

sourceEventId

integer (int64)

timeStampValue
optional

timeStampValue

string

3.13. RetrieveSamplesInfo

Retrive Samples Data Transfer Object

Name Schema

autoGeneratedSample
optional

boolean

commentId
optional

integer (int64)

endTime
optional

string

materialLotId
optional

integer (int64)

sampleId
optional

integer (int64)

sampleName
optional

string

unitId
optional

integer (int64)

3.14. SampleMaterialLotInfo

Sample material lot.

Name Description Schema

materialLotId
optional

The Id of Material Lot

integer (int64)

sampleName
optional

The name of Sample Material Lot

string

3.15. SampleMaterialLotResult

Get Sample material lot.

Name Description Schema

endTime
optional

The end time of the Sample

string

materialLotId
optional

The Id of the Sample Material Lot

integer (int64)

receiverId
optional

The Id of the parent receiver

integer (int64)

sampleId
optional

The Id of the Sample

integer (int64)

sampleName
optional

The name of the Sample

string

startTime
optional

The start time of the Sample

string

unitId
optional

The Id of the Sample Material Lot

integer (int64)

3.16. SampleMaterialLotUpdateInfo

Sample update data tranfer object

Name Description Schema

sampleName
optional

Name of the sample

string

3.17. StatusCombination

Name Schema

fromStatusDescription
optional

string

fromStatusId
optional

integer (int32)

toStatusDescription
optional

string

toStatusId
optional

integer (int32)

3.18. TestMaterialLotInfo

Create Tests info .

Name Description Schema

eventId
required

event Id can be either production event or sample id

integer (int64)

testValue
required

Name of test value

string

variableId
required

Variable Id

integer (int32)

3.19. TestMaterialLotInfoWrapper

Get Test material lot.

Name Description Schema

cancelled
required

Cancelled
Example : false

boolean

commentId
required

Comment Id

string

resultOn
required

result On

string

sampleId
required

Sample Id

integer (int64)

specDesc
required

Specification Name

string

testId
required

Test Id

integer (int64)

testValue
required

Name of test value

string

varPrecision
required

Variable Precision

integer (int32)

variableId
required

Variable Id

integer (int32)

3.20. TestMaterialLotResult

Name Description Schema

cancelled
required

Cancelled
Example : false

boolean

eventId
required

Event Id

integer (int64)

resultOn
required

result On

string

testId
required

Test Id

integer (int64)

testValue
required

Name of test value

string

variableId
required

Variable Id

integer (int32)

3.21. TransactionStatus

Name Schema

links
optional

< Link > array

plannedUnitId
optional

integer (int64)

prodExecutionTransitions
optional

< StatusCombination > array

3.22. ValidationRequestInfo

Validate MaterialLots request data transfer object

Name Description Schema

materialLotNames
optional

List of materialLot names

< string > array

newLotStatusId
optional

Status ID of the material lot to be updated

integer (int32)

plannedUnitId
optional

plannedUnitId

integer (int64)

productId
optional

productId

integer (int32)

transNum
optional

TransNum value to determine the type of validation to perform

enum (1, 2)

3.23. ValidationResponse

Name Schema

errorCode
optional

string

errorMessage
optional

string

eventNumberList
optional

string

links
optional

< Link > array

3.24. Variables

Get variables information

Name Description Schema

dataTypeId
optional

DatatypeId of variable

integer (int64)

puId
optional

Unit Id of product

integer (int64)

samplingInterval
optional

Sampling Interval

integer (int32)

userDefined
optional

User Defined value

string

varDesc
optional

Variable description

string

varId
optional

Variable Id of Test

integer (int64)

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : https://pawin2k19-2/uaa/oauth/authorize
Token URL : https://pawin2k19-2/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : https://pawin2k19-2/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : https://pawin2k19-2/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : https://pawin2k19-2/uaa/oauth/token

Name Description

default

Default oauth2 scope.