1. Overview

BFF Layer for genealogy-app-service

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • graph-viewer-controller : Graph Viewer Controller

  • material-lot-viewer-controller : Material Lot Viewer Controller

  • source-details-viewer-controller : Source Details Viewer Controller

  • used-in-viewer-controller : Used In Viewer Controller

  • user-settings-controller : User Settings Controller

2. Resources

2.1. Graph-viewer-controller

Graph Viewer Controller

2.1.1. Get material lot grapsh details

GET /v1/graph
Parameters
Type Name Description Schema

Query

materialLotId
required

matertial lot id

integer (int64)

Responses
HTTP Code Description Schema

200

successful

GraphResponse

401

Unauthorized

No Content

404

ERR404

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal server error

No Content

503

Service unavailable

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. Material-lot-viewer-controller

Material Lot Viewer Controller

2.2.1. Get material lot genealogy view data

GET /v1/materialLots/genealogy
Parameters
Type Name Description Schema

Query

lotIdentifier
required

lot identifier (use lot_identifier/event_num for this property

string

Responses
HTTP Code Description Schema

200

successful

object

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal server error

No Content

503

Service Unavailable

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 material lot genealogy view data by target lot id

GET /v1/materialLots/genealogy/{targetLotId}
Parameters
Type Name Description Schema

Path

targetLotId
required

targetLotId

integer (int64)

Responses
HTTP Code Description Schema

200

successful

object

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal server error

No Content

503

Service Unavailable

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.3. Get SourceLots of a target lot

GET /v1/materialLots/genealogy/{targetLotId}/sourceLots
Parameters
Type Name Description Schema

Path

targetLotId
required

Target lot/event Id

integer (int64)

Responses
HTTP Code Description Schema

200

successful

object

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal server error

No Content

503

Service Unavailable

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. Source-details-viewer-controller

Source Details Viewer Controller

2.3.1. Get Source Details data

GET /v1/sourceDetails
Parameters
Type Name Description Schema

Query

materialLotId
required

Matertial Lot of product

integer (int64)

Responses
HTTP Code Description Schema

200

successful

object

401

Unauthorized

No Content

404

ERR404

No Content

500

Internal server error

No Content

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. Used-in-viewer-controller

Used In Viewer Controller

2.4.1. Get material lot used in details

GET /v1/usedin/{materialLotId}
Parameters
Type Name Description Schema Default

Path

materialLotId
required

matertial lot id

integer (int64)

Query

page
optional

integer (int32)

0

Query

size
optional

integer (int32)

20

Responses
HTTP Code Description Schema

200

successful

UsedInInfoPage

401

Unauthorized

No Content

404

ERR404

No Content

422

Unprocessable Entity

HttpErrorResponse

500

Internal server error

No Content

503

Service unavailable

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. User-settings-controller

User Settings Controller

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

UserSettingResponseResource

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

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

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

UserSettingResponseResource

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

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

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

UserSettingResponseResource

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

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

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

string

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

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

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

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

3. Definitions

3.1. EntityModel«UsedInInfo»

Name Description Schema

currentQty
optional

MateriLot currentQty

number (float)

id
optional

MateriLot Id

integer (int64)

initialQty
optional

MateriLot initialQty

number (double)

links
optional

Links

lotDesc
optional

MateriLot lotDesc

string

lotId
optional

MateriLot lotId

integer (int64)

prodCode
optional

MateriLot prodCode

string

prodDesc
optional

MateriLot prodDesc

string

prodFamilyDesc
optional

MateriLot prodFamilyDesc

string

prodFamilyId
optional

MateriLot prodFamilyId

integer (int64)

prodId
optional

MateriLot prodId

integer (int64)

status
optional

MateriLot Status

string

unit
optional

MateriLot unit

string

unitId
optional

MateriLot unitId

integer (int64)

unitOfMeasure
optional

MaterialLot UnitOfMeasure

string

unitOfMeasureId
optional

MaterialLot UnitOfMeasure Id

integer (int64)

usedQty
optional

MateriLot usedQty

number (double)

3.2. Error

Name Schema

code
optional

string

details
optional

object

3.3. GraphInfo

Name Description Schema

consumedQuantity
optional

Consumed Quantity

number (double)

engineeringUnit
optional

Unit of Measure

string

location
optional

Location of Material

string

lotIdentifier
optional

Material LotIdentifier

string

materialLotId
optional

Material Lot Id

integer (int64)

productCode
optional

Product Code

string

status
optional

Status of Lot

string

3.4. GraphResponse

Name Description Schema

materialLotId
optional

Material Lot Id

integer (int64)

sourceLots
optional

Material Source Lots

< GraphInfo > array

targetLots
optional

Material Target Lots

< GraphInfo > array

3.5. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

Name Description Schema

deprecation
optional

string

href
optional

string

hreflang
optional

string

media
optional

string

name
optional

string

profile
optional

string

rel
optional

string

template
optional

UriTemplate

templated
optional

Example : false

boolean

title
optional

string

type
optional

string

Name Schema

empty
optional

boolean

3.8. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.9. PrivilegeSet

Name Schema

category
optional

string

description
optional

string

displayName
optional

string

icon
optional

string

id
optional

integer (int32)

scope
optional

string

3.10. TemplateVariable

Name Schema

description
optional

string

name
optional

string

type
optional

enum (, ?, &, /, #, *)

3.11. UriTemplate

Name Schema

variableNames
optional

< string > array

variables
optional

< TemplateVariable > array

3.12. UsedInInfo

Name Description Schema

currentQty
optional

MateriLot currentQty

number (float)

id
optional

MateriLot Id

integer (int64)

initialQty
optional

MateriLot initialQty

number (double)

lotDesc
optional

MateriLot lotDesc

string

lotId
optional

MateriLot lotId

integer (int64)

prodCode
optional

MateriLot prodCode

string

prodDesc
optional

MateriLot prodDesc

string

prodFamilyDesc
optional

MateriLot prodFamilyDesc

string

prodFamilyId
optional

MateriLot prodFamilyId

integer (int64)

prodId
optional

MateriLot prodId

integer (int64)

status
optional

MateriLot Status

string

unit
optional

MateriLot unit

string

unitId
optional

MateriLot unitId

integer (int64)

unitOfMeasure
optional

MaterialLot UnitOfMeasure

string

unitOfMeasureId
optional

MaterialLot UnitOfMeasure Id

integer (int64)

usedQty
optional

MateriLot usedQty

number (double)

3.13. UsedInInfoPage

Name Schema

content
optional

< EntityModel«UsedInInfo» > array

links
optional

Links

page
optional

PageMetadata

3.14. 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.15. UserSettingResponseResource

Name Description Schema

appId
optional

integer (int32)

data
optional

object

defaultSetting
optional

Example : false

boolean

links
optional

< Link > array

viewName
optional

string

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : http://localhost:8080/uaa/oauth/authorize
Token URL : http://localhost:8080/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : http://localhost:8080/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : http://localhost:8080/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : http://localhost:8080/uaa/oauth/token

Name Description

default

Default oauth2 scope.