1. Overview

Microservice containing the business logic for managing productionmetrics-app-service.

1.1. URI scheme

Host : localhost
BasePath : /line-overview-app-service/

1.2. Tags

  • asset-controller : Asset Controller

  • common-plant-controller : Common Plant Controller

  • line-overview-controller : Line Overview Controller

  • user-settings-controller : User Settings Controller

2. Resources

2.1. Asset-controller

Asset Controller

2.1.1. Fetch all Departments in the Plant Floor

GET /line-overview-viewer/departments
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

Responses
HTTP Code Description Schema

200

OK

DepartmentsResource

204

No Content

DepartmentsResource

400

Bad Request

No Content

401

Unauthorized

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.1.2. Fetch lines based on the departmentId provided. If departmentId is not provided, it will return all lines in all departments

GET /line-overview-viewer/lines
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

departmentId
optional

Department Id

integer (int64)

Responses
HTTP Code Description Schema

200

OK

LineAssetsResource

204

No Content

LineAssetsResource

400

Bad Request

No Content

401

Unauthorized

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.1.3. Fetch units based on the lineId provided. If lineId is not provided, it will return all units in all lines

GET /line-overview-viewer/units
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

lineId
optional

Line Id

integer (int64)

Responses
HTTP Code Description Schema

200

OK

UnitAssetsResource

204

No Content

UnitAssetsResource

400

Bad Request

No Content

401

Unauthorized

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.2. Common-plant-controller

Common Plant Controller

2.2.1. Fetch the timerange based on the selected timeselection

GET /line-overview-viewer/time-selection
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

equipmentId
optional

Comma separated unit ids

< string > array(multi)

Query

equipmentType
optional

Type of the equipment - 1 for Units and 2 for Lines. Based on equipmentType it will either return Unit based Kpi or Line based Kpi for the specified unitIds

integer (int32)

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int32)

Responses
HTTP Code Description Schema

200

OK

TimeSelectionResource

204

No Content

TimeSelectionResource

Security
Type Name Scopes

oauth2

access_token

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.3. Line-overview-controller

Line Overview Controller

2.3.1. Fetch all downtime categories based on the specified unitIds and selected timerange

GET /line-overview-viewer/categories
Parameters
Type Name Description Schema Default

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

endTime
optional

End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

filterNpt
optional

Include Non productive time when set to false and exclude it when set to true.

boolean

"false"

Query

line
required

Line Id

string

Query

oeeParameter
optional

Define the type of downtime whether it is Availability, Performance or Quality, required in case OEE mode of unit is time based.

enum (Availability, Quality, Performance)

Query

showTopNBars
optional

Please leave this field blank, This parameter is not being used. It will be deprecated later.

integer (int64)

Query

sortOrder
optional

Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability

integer (int64)

1

Query

startTime
optional

Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int64)

Query

toggle
optional

Please leave this field blank, This parameter is not being used. It will be deprecated later.

integer (int64)

1

Query

unitList
optional

Comma separated unit ids

string

Responses
HTTP Code Description Schema

200

OK

AvailabilityCategoryResource

204

No Content

AvailabilityCategoryResource

400

Bad Request

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.3.2. Fetch the downtime records based on the specified unitIds and selected timerange

GET /line-overview-viewer/events/line/{lineId}
Parameters
Type Name Description Schema Default

Header

Site-Id
required

Represents the id of the site to connect to

string

Path

lineId
required

Line Id

integer (int32)

Query

ascDesc
optional

0 for sort by OEE percentage, 1 for sort by PerformanceRate, 2 for sort by QualityRate, 3 for sort by AvailableRate and 4 for sort by UnitDescription

integer (int32)

0

Query

endTime
optional

End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string

Query

filterNpt
optional

Include Non productive time when set to false and exclude it when set to true.

boolean

"false"

Query

machineId
optional

Comma separated unit ids

string

Query

sortOrder
optional

Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability

integer (int32)

0

Query

startTime
optional

Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int32)

Responses
HTTP Code Description Schema

200

OK

LineDistributionResponseResource

204

No Content

LineDistributionResponseResource

400

Bad Request

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.3.3. Fetch the downtime records based on the specified unit and timeselection

GET /line-overview-viewer/events/machine/{equipmentId}
Parameters
Type Name Description Schema Default

Header

Site-Id
required

Represents the id of the site to connect to

string

Path

equipmentId
required

Unit Id

integer (int32)

Query

ascDesc
optional

0 for sort by OEE percentage, 1 for sort by PerformanceRate, 2 for sort by QualityRate, 3 for sort by AvailableRate and 4 for sort by UnitDescription

integer (int32)

0

Query

endTime
optional

End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string

Query

filterNpt
optional

Include Non productive time when set to false and exclude it when set to true.

boolean

"false"

Query

oeeParameter
optional

Define the type of downtime whether it is Availability, Performance or Quality, required in case OEE mode of unit is time based.

string

Query

pageNum
optional

Fetch the Nth page records

integer (int32)

1

Query

pageSize
optional

Number of records per page, from 1 to 500

integer (int32)

20

Query

sortOrder
optional

Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability

integer (int32)

0

Query

startTime
optional

Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int32)

Responses
HTTP Code Description Schema

200

OK

LineDistributionResponseResource

204

No Content

LineDistributionResponseResource

400

Bad Request

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.3.4. Fetch Mean Time To Repair (MTTR) and Mean Time Before Failure (MTBF) based on the specified unitIds and selected timerange

GET /line-overview-viewer/mttr-mtbf
Parameters
Type Name Description Schema Default

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

endTime
optional

End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

equipmentType
required

Type of the equipment - 1 for Units and 2 for Lines. Based on equipmentType it will either return Unit based Kpi or Line based Kpi for the specified unitIds

integer (int32)

Query

filterNpt
optional

Include Non productive time when set to false and exclude it when set to true.

boolean

"false"

Query

lineId
optional

Line Id

integer (int32)

Query

oeeParameter
optional

Define the type of downtime whether it is Availability, Performance or Quality, required in case OEE mode of unit is time based.

enum (Availability, Quality, Performance)

Query

showTopNBars
optional

Please leave this field blank, This parameter is not being used. It will be deprecated later.

integer (int64)

Query

sortOrder
optional

Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability

integer (int64)

1

Query

startTime
optional

Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int32)

Query

unitList
required

Semicolon separated list of unit ids

string

Responses
HTTP Code Description Schema

200

OK

AvailabilitySummary1EntityModel

204

No Content

AvailabilitySummary1EntityModel

400

Bad Request

No Content

401

Unauthorized

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.3.5. Fetch all downtime Reasons based on the specified unitIds and selected timerange

GET /line-overview-viewer/reasons
Parameters
Type Name Description Schema Default

Header

Site-Id
required

Represents the id of the site to connect to

string

Query

endTime
optional

End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

filterNpt
optional

Include Non productive time when set to false and exclude it when set to true.

boolean

"false"

Query

lineList
required

Line Id

string

Query

oeeParameter
optional

Define the type of downtime whether it is Availability, Performance or Quality, required in case OEE mode of unit is time based.

string

Query

showTopNBars
optional

Number of top level reasons (reason1) to be returned, default to 5

integer (int64)

Query

sortOrder
optional

Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability

integer (int64)

1

Query

startTime
optional

Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection.

string (date-time)

Query

timeSelection
required

Time selection values
1 - Current Day
2 - Prev Day
3 - Current Week
4 - Prev Week
5 - Next Week
6 - Next Day
7 - Custom
8 - Current Shift
9 - Previous Shift
10- Next Shift

integer (int32)

Query

toggle
optional

Please leave this field blank, This parameter is not being used. It will be deprecated later.

integer (int64)

0

Query

unitList
optional

Semicolon separated list of unit ids

string

Responses
HTTP Code Description Schema

200

OK

AvailabilityCategoryResource

204

No Content

AvailabilityCategoryResource

400

Bad Request

No Content

401

Unauthorized

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

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

Header

Site-Id
required

Represents the id of the site to connect to

string

Body

userSettingsRequest
required

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.4.2. Get User settings for the logged in User

GET /v2/settings
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.4.3. Update User settings for the logged in user

PUT /v2/settings
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

Body

request
required

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.4.4. Delete User settings for the logged in user

DELETE /v2/settings
Parameters
Type Name Description Schema

Header

Site-Id
required

Represents the id of the site to connect to

string

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

2.4.5. Get Privilege Sets

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

Header

Site-Id
required

Represents the id of the site to connect to

string

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

resource_owner

default

oauth2

implicit_grant

default

oauth2

client_creds

default

3. Definitions

3.1. AssetInfo

Name Schema

assetId
optional

integer (int64)

assetType
optional

string

identifier
optional

integer (int64)

lineId
optional

integer (int64)

name
optional

string

3.2. AssetMetricData

Name Schema

availableRate
optional

number (double)

line
optional

string

lineAssets
optional

< AssetInfo > array

lineId
optional

integer (int32)

oeeMode
optional

integer (int32)

percentOEE
optional

number (double)

performanceRate
optional

number (double)

qualityRate
optional

number (double)

unitDesc
optional

string

unitId
optional

integer (int32)

unitsCount
optional

integer (int32)

3.3. AvailabilityCategoryDistribution

Name Schema

events
optional

integer (int32)

name
optional

string

totalTime
optional

number (float)

3.4. AvailabilityCategoryResource

Name Schema

categoryByDuration
optional

< AvailabilityCategoryDistribution > array

categoryByEvent
optional

< AvailabilityCategoryDistribution > array

links
optional

Links

3.5. AvailabilityDistribution

Name Description Schema

events
optional

The events data of this availability distribution

integer (int32)

faults
optional

The faults data of this availability distribution

string

mtbf
optional

The mean time between failure of this availability distribution

string

mttr
optional

The mean time to repair of this availability distribution in hh:mm:ss format

string

name
optional

The Level name of this availability distribution

string

quality
optional

The quality data of this availability distribution

string

totalTime
optional

The total time duration for this availability distribution

number (float)

3.6. AvailabilitySummary1EntityModel

Name Schema

links
optional

Links

location
optional

< AvailabilityDistribution > array

reason1
optional

< AvailabilityDistribution > array

3.7. DepartmentsResource

Name Schema

depts
optional

< EntityModel«AssetInfo» > array

links
optional

Links

3.8. DowntimeCategory

Name Schema

id
optional

string

name
optional

string

3.9. EntityModel«AssetInfo»

Name Schema

assetId
optional

integer (int64)

assetType
optional

string

identifier
optional

integer (int64)

lineId
optional

integer (int64)

links
optional

Links

name
optional

string

3.10. Error

Name Schema

code
optional

string

details
optional

object

3.11. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.12. LineAssetsResource

Name Schema

line
optional

< EntityModel«AssetInfo» > array

links
optional

Links

3.13. LineDistributionResponseResource

Name Schema

assetMetrics
optional

< AssetMetricData > array

downtimeCategories
optional

< DowntimeCategory > array

eventEndTime
optional

string

eventEpochEndTime
optional

integer (int64)

eventEpochStartTime
optional

integer (int64)

eventStartTime
optional

string

lineDowntimeByReasons
optional

< LineDowntimeData > array

links
optional

Links

3.14. LineDowntimeData

Name Schema

category
optional

string

crewDesc
optional

string

detailId
optional

integer (int32)

duration
optional

number (float)

endTime
optional

string

fault
optional

string

location
optional

string

reason1
optional

string

reason2
optional

string

reason3
optional

string

reason4
optional

string

shiftDesc
optional

string

startTime
optional

string

unit
optional

string

unitId
optional

integer (int32)

Name 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

boolean

title
optional

string

type
optional

string

Name Schema

empty
optional

boolean

3.17. PrivilegeSet

Name Schema

category
optional

string

description
optional

string

displayName
optional

string

icon
optional

string

id
optional

integer (int32)

scope
optional

string

3.18. TemplateVariable

Name Schema

description
optional

string

name
optional

string

type
optional

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

3.19. TimeSelectionResource

Name Description Schema

endTime
optional

End time in ISO-8601 format

string

eventEpochEndTime
optional

The end time in epoch second format

integer (int64)

eventEpochStartTime
optional

The start time in epoch second format

integer (int64)

links
optional

Links

startTime
optional

Start time in ISO-8601 format

string

3.20. UnitAssetsResource

Name Schema

links
optional

Links

units
optional

< EntityModel«AssetInfo» > array

3.21. UriTemplate

Name Schema

variableNames
optional

< string > array

variables
optional

< TemplateVariable > array

3.22. 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.23. UserSettingResponseResource

Name Schema

appId
optional

integer (int32)

data
optional

object

defaultSetting
optional

boolean

links
optional

< Link > array

viewName
optional

string

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : https://10.181.212.187/uaa/oauth/authorize
Token URL : https://10.181.212.187/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : https://10.181.212.187/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : https://10.181.212.187/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : https://10.181.212.187/uaa/oauth/token

Name Description

default

Default oauth2 scope.