1. Overview

BFF Layer for genealogy-app-service

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

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

Material Lot Viewer Controller

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

Source Details Viewer Controller

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

Used In Viewer Controller

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

3. Definitions

3.1. Error

Name Schema

code
optional

string

details
optional

object

3.2. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

Name Description Schema

href
optional

string

rel
optional

string

templated
optional

Example : false

boolean

3.4. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.5. PrivilegeSet

Name Schema

category
optional

string

description
optional

string

displayName
optional

string

icon
optional

string

id
optional

integer (int32)

scope
optional

string

3.6. Resource«UsedInInfo»

Name Schema

currentQty
optional

number (float)

id
optional

integer (int64)

initialQty
optional

number (double)

links
optional

< Link > array

lotDesc
optional

string

lotId
optional

integer (int64)

prodCode
optional

string

prodDesc
optional

string

prodFamilyDesc
optional

string

prodFamilyId
optional

integer (int64)

prodId
optional

integer (int64)

status
optional

string

unit
optional

string

unitId
optional

integer (int64)

usedQty
optional

number (double)

3.7. UsedInInfo

Name Schema

currentQty
optional

number (float)

id
optional

integer (int64)

initialQty
optional

number (double)

lotDesc
optional

string

lotId
optional

integer (int64)

prodCode
optional

string

prodDesc
optional

string

prodFamilyDesc
optional

string

prodFamilyId
optional

integer (int64)

prodId
optional

integer (int64)

status
optional

string

unit
optional

string

unitId
optional

integer (int64)

usedQty
optional

number (double)

3.8. UsedInInfoPage

Name Schema

content
optional

< Resource«UsedInInfo» > array

links
optional

< Link > array

page
optional

PageMetadata

3.9. 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.10. UserSettingResource

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.