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 |
Represents the id of the site to connect to |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
Query |
departmentId |
Department Id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
Query |
lineId |
Line Id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
Query |
equipmentId |
Comma separated unit ids |
< string > array(multi) |
Query |
equipmentType |
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 |
Time selection values |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
Produces
-
/
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
|
Query |
endTime |
End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
filterNpt |
Include Non productive time when set to false and exclude it when set to true. |
boolean |
|
Query |
line |
Line Id |
string |
|
Query |
oeeParameter |
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 |
Please leave this field blank, This parameter is not being used. It will be deprecated later. |
integer (int64) |
|
Query |
sortOrder |
Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability |
integer (int64) |
|
Query |
startTime |
Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
timeSelection |
Time selection values |
integer (int64) |
|
Query |
toggle |
Please leave this field blank, This parameter is not being used. It will be deprecated later. |
integer (int64) |
|
Query |
unitList |
Comma separated unit ids |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
|
Path |
lineId |
Line Id |
integer (int32) |
|
Query |
ascDesc |
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) |
|
Query |
endTime |
End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string |
|
Query |
filterNpt |
Include Non productive time when set to false and exclude it when set to true. |
boolean |
|
Query |
machineId |
Comma separated unit ids |
string |
|
Query |
sortOrder |
Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability |
integer (int32) |
|
Query |
startTime |
Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string |
|
Query |
timeSelection |
Time selection values |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
|
Path |
equipmentId |
Unit Id |
integer (int32) |
|
Query |
ascDesc |
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) |
|
Query |
endTime |
End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string |
|
Query |
filterNpt |
Include Non productive time when set to false and exclude it when set to true. |
boolean |
|
Query |
oeeParameter |
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 |
Fetch the Nth page records |
integer (int32) |
|
Query |
pageSize |
Number of records per page, from 1 to 500 |
integer (int32) |
|
Query |
sortOrder |
Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability |
integer (int32) |
|
Query |
startTime |
Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string |
|
Query |
timeSelection |
Time selection values |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
|
Query |
endTime |
End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
equipmentType |
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 |
Include Non productive time when set to false and exclude it when set to true. |
boolean |
|
Query |
lineId |
Line Id |
integer (int32) |
|
Query |
oeeParameter |
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 |
Please leave this field blank, This parameter is not being used. It will be deprecated later. |
integer (int64) |
|
Query |
sortOrder |
Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability |
integer (int64) |
|
Query |
startTime |
Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
timeSelection |
Time selection values |
integer (int32) |
|
Query |
unitList |
Semicolon separated list of unit ids |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
|
Query |
endTime |
End time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
filterNpt |
Include Non productive time when set to false and exclude it when set to true. |
boolean |
|
Query |
lineList |
Line Id |
string |
|
Query |
oeeParameter |
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 |
Number of top level reasons (reason1) to be returned, default to 5 |
integer (int64) |
|
Query |
sortOrder |
Sort order by KPI, 1 - Performance 2 - Quality 3 - Availability |
integer (int64) |
|
Query |
startTime |
Start time in ISO-8601 format (YYYY-MM-DDThh:mm:ssZ), in case of custom time selection. |
string (date-time) |
|
Query |
timeSelection |
Time selection values |
integer (int32) |
|
Query |
toggle |
Please leave this field blank, This parameter is not being used. It will be deprecated later. |
integer (int64) |
|
Query |
unitList |
Semicolon separated list of unit ids |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content |
|
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 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Represents the id of the site to connect to |
string |
Body |
userSettingsRequest |
User Setting Object |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
204 |
No Content, Error retrieving created user settings |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
App ID not found in privilege set |
|
409 |
Conflict, User Setting already exists. Use a PUT to update |
|
500 |
Internal Server Error |
Consumes
-
application/json
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.4.2. Get User settings for the logged in User
GET /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Site-Id |
Represents the id of the site to connect to |
string |
Query |
appId |
appId |
integer (int32) |
Query |
viewName |
viewName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not found, no user setting found for the user |
|
500 |
Internal Server Error |
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.4.3. Update User settings for the logged in user
PUT /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Site-Id |
Represents the id of the site to connect to |
string |
Body |
request |
User Preference Object |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not Found, There is no saved User settings for the logged in user |
|
500 |
Internal Server Error |
Consumes
-
application/json
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.4.4. Delete User settings for the logged in user
DELETE /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Site-Id |
Represents the id of the site to connect to |
string |
Query |
appId |
appId |
integer (int32) |
Query |
viewName |
viewName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
Success |
string |
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not Found, User Setting not found |
|
500 |
Internal Server Error |
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.4.5. Get Privilege Sets
GET /v2/settings/apps
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Site-Id |
Represents the id of the site to connect to |
string |
Query |
appName |
appName |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< PrivilegeSet > array |
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not found, no user setting found for the user |
|
500 |
Internal Server Error |
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
3. Definitions
3.1. AssetInfo
Name | Schema |
---|---|
assetId |
integer (int64) |
assetType |
string |
identifier |
integer (int64) |
lineId |
integer (int64) |
name |
string |
3.2. AssetMetricData
Name | Schema |
---|---|
availableRate |
number (double) |
line |
string |
lineAssets |
< AssetInfo > array |
lineId |
integer (int32) |
oeeMode |
integer (int32) |
percentOEE |
number (double) |
performanceRate |
number (double) |
qualityRate |
number (double) |
unitDesc |
string |
unitId |
integer (int32) |
unitsCount |
integer (int32) |
3.3. AvailabilityCategoryDistribution
Name | Schema |
---|---|
events |
integer (int32) |
name |
string |
totalTime |
number (float) |
3.4. AvailabilityCategoryResource
Name | Schema |
---|---|
categoryByDuration |
< AvailabilityCategoryDistribution > array |
categoryByEvent |
< AvailabilityCategoryDistribution > array |
links |
3.5. AvailabilityDistribution
Name | Description | Schema |
---|---|---|
events |
The events data of this availability distribution |
integer (int32) |
faults |
The faults data of this availability distribution |
string |
mtbf |
The mean time between failure of this availability distribution |
string |
mttr |
The mean time to repair of this availability distribution in hh:mm:ss format |
string |
name |
The Level name of this availability distribution |
string |
quality |
The quality data of this availability distribution |
string |
totalTime |
The total time duration for this availability distribution |
number (float) |
3.6. AvailabilitySummary1EntityModel
Name | Schema |
---|---|
links |
|
location |
< AvailabilityDistribution > array |
reason1 |
< AvailabilityDistribution > array |
3.7. DepartmentsResource
Name | Schema |
---|---|
depts |
< EntityModel«AssetInfo» > array |
links |
3.8. DowntimeCategory
Name | Schema |
---|---|
id |
string |
name |
string |
3.9. EntityModel«AssetInfo»
Name | Schema |
---|---|
assetId |
integer (int64) |
assetType |
string |
identifier |
integer (int64) |
lineId |
integer (int64) |
links |
|
name |
string |
3.10. Error
Name | Schema |
---|---|
code |
string |
details |
object |
3.11. HttpErrorResponse
Name | Schema |
---|---|
error |
|
path |
string |
timestamp |
string |
3.12. LineAssetsResource
Name | Schema |
---|---|
line |
< EntityModel«AssetInfo» > array |
links |
3.13. LineDistributionResponseResource
Name | Schema |
---|---|
assetMetrics |
< AssetMetricData > array |
downtimeCategories |
< DowntimeCategory > array |
eventEndTime |
string |
eventEpochEndTime |
integer (int64) |
eventEpochStartTime |
integer (int64) |
eventStartTime |
string |
lineDowntimeByReasons |
< LineDowntimeData > array |
links |
3.14. LineDowntimeData
Name | Schema |
---|---|
category |
string |
crewDesc |
string |
detailId |
integer (int32) |
duration |
number (float) |
endTime |
string |
fault |
string |
location |
string |
reason1 |
string |
reason2 |
string |
reason3 |
string |
reason4 |
string |
shiftDesc |
string |
startTime |
string |
unit |
string |
unitId |
integer (int32) |
3.15. Link
Name | Schema |
---|---|
deprecation |
string |
href |
string |
hreflang |
string |
media |
string |
name |
string |
profile |
string |
rel |
string |
template |
|
templated |
boolean |
title |
string |
type |
string |
3.16. Links
Name | Schema |
---|---|
empty |
boolean |
3.17. PrivilegeSet
Name | Schema |
---|---|
category |
string |
description |
string |
displayName |
string |
icon |
string |
id |
integer (int32) |
scope |
string |
3.18. TemplateVariable
Name | Schema |
---|---|
description |
string |
name |
string |
type |
enum (, ?, &, /, #, *) |
3.19. TimeSelectionResource
Name | Description | Schema |
---|---|---|
endTime |
End time in ISO-8601 format |
string |
eventEpochEndTime |
The end time in epoch second format |
integer (int64) |
eventEpochStartTime |
The start time in epoch second format |
integer (int64) |
links |
||
startTime |
Start time in ISO-8601 format |
string |
3.20. UnitAssetsResource
Name | Schema |
---|---|
links |
|
units |
< EntityModel«AssetInfo» > array |
3.21. UriTemplate
Name | Schema |
---|---|
variableNames |
< string > array |
variables |
< TemplateVariable > array |
3.22. UserSettingRequest
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} } |
object |
viewName |
string |
3.23. UserSettingResponseResource
Name | Schema |
---|---|
appId |
integer (int32) |
data |
object |
defaultSetting |
boolean |
links |
< Link > array |
viewName |
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. |