1. Overview
Microservice containing the business logic for managing operator-log-app-service.
1.1. URI scheme
Host : localhost
BasePath : /
1.2. Tags
-
data-model-controller : Data Model Controller
-
operator-log-controller : Operator Log Controller
-
user-settings-controller : User Settings Controller
2. Resources
2.1. Data-model-controller
Data Model Controller
2.1.1. get line list
GET /v1/datamodel/line
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
object |
204 |
No Content |
object |
401 |
Unauthorized |
No Content |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.1.2. get unit list
GET /v1/datamodel/unit
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
lineId |
Line id to apply filter |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
object |
204 |
No Content |
object |
401 |
Unauthorized |
No Content |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2. Operator-log-controller
Operator Log Controller
2.2.1. Fetche all users based on users status-active/inActive
GET /v1/operatorLogEvents/UsersList
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
isActive |
isActive |
enum (true, false) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
No Content |
No Content |
400 |
Bad Request |
No Content |
401 |
Unauthorized |
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.2. Creates a new event
POST /v1/operatorLogEvents/events
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
eventRecord |
Log EventRecord object to add a new event |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
Consumes
-
application/json;charset=UTF-8
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2.3. Fetches Events
GET /v1/operatorLogEvents/events
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
assignTo |
assign to |
string |
Query |
endTime |
End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
eventType |
eventType |
enum (LogEntries, Incidents, HandOffs) |
Query |
line |
List of Line Id’s, Can also set comma seperated Line ids |
string |
Query |
startTime |
Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
status |
status |
enum (Open, InProgress, Closed) |
Query |
timeSelection |
timeSelection |
enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift) |
Query |
unit |
List of Unit Ids, Can also set comma seperated unit ids for this property |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad request |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource 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.4. Get Activities Events
GET /v1/operatorLogEvents/getActivitiesEvents
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
endTime |
End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
eventTypes |
Comma separated eventTypes to filter activities, can be 1-TimeBased Event, 2-Production, 4-Product Change, and 25-UDE |
enum (1, 2, 4, 25) |
Query |
line |
Line Id |
string |
Query |
startTime |
Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
timeSelection |
timeSelection |
enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift) |
Query |
unit |
List of Unit Ids, Can also set comma seperated unit ids for this property |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad request |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource 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.5. Get Downtime Events
GET /v1/operatorLogEvents/getDowntimeEvents
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
endTime |
End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
line |
Line Id |
string |
Query |
startTime |
Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
timeSelection |
timeSelection |
enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift) |
Query |
unit |
List of Unit Ids, Can also set comma seperated unit ids for this property |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad request |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource 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.6. Fetches Events by id
GET /v1/operatorLogEvents/id
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
Id |
Log detail Id |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad request |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource 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.7. fetches the timeselect
GET /v1/operatorLogEvents/timeSelection
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
endTime |
End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
startTime |
Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
Query |
timeSelection |
timeSelection |
enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
No Content |
No Content |
400 |
Bad Request |
No Content |
401 |
Unauthorized |
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.8. updating the status
PUT /v1/operatorLogEvents/updateStatus
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
eventRecord |
Log EventRecord Object to update the status |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
Consumes
-
application/json
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.3. User-settings-controller
User Settings Controller
2.3.1. Create User settings for the logged in user
POST /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
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.3.2. Get User settings for the logged in User
GET /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
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.3.3. Update User settings for the logged in user
PUT /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
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.3.4. Delete User settings for the logged in user
DELETE /v2/settings
Parameters
Type | Name | Description | Schema |
---|---|---|---|
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.3.5. Get Privilege Sets
GET /v2/settings/apps
Parameters
Type | Name | Description | Schema |
---|---|---|---|
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. BaseResponse
Name | Schema |
---|---|
data |
object |
links |
< Link > array |
message |
string |
statusCode |
integer (int32) |
3.2. Error
Name | Schema |
---|---|
code |
string |
details |
object |
3.3. HttpErrorResponse
Name | Schema |
---|---|
error |
|
path |
string |
timestamp |
string |
3.4. IdNameValue
Name | Description | Schema |
---|---|---|
id |
The unique ID of the entity |
integer (int64) |
name |
The name of the entity |
string |
3.5. Link
Name | Description | Schema |
---|---|---|
deprecation |
string |
|
href |
string |
|
hreflang |
string |
|
media |
string |
|
name |
string |
|
profile |
string |
|
rel |
string |
|
template |
||
templated |
Example : |
boolean |
title |
string |
|
type |
string |
3.6. OperateLogEventUpdate
Name | Description | Schema |
---|---|---|
logDetailId |
Log DetailsId defines the logtypeID |
integer (int64) |
statusId |
status of the log event |
integer (int64) |
3.7. OperatorLogEvent
Name | Description | Schema |
---|---|---|
assignedTo |
assigned user of the log event |
|
cause1 |
The Level 1 Cause (Reason) of the Event record. |
|
cause2 |
The Level 2 Cause (Reason) of the Event record. |
|
cause3 |
The Level 3 Cause (Reason) of the Event record. |
|
cause4 |
The Level 4 Cause (Reason) of the Event record. |
|
comment |
comment id of the log event |
|
endTime |
The end time of the log event |
string (date-time) |
entryOn |
The entry on time of the log event |
string (date-time) |
line |
productionLineId of Log Event |
|
linkedEvents |
Linked events |
object |
logDetailId |
Unique identifier of this Log Event record |
integer (int64) |
logType |
Log Type defines the type of Log Event |
|
sourceProductionUnitId |
sourceProductionUnitId od Log Event |
integer (int64) |
startTime |
The start time of the log event starts |
string (date-time) |
statusId |
status of the log event |
|
summary |
summary of the log event |
string |
unit |
productionUnitId of Log Event |
|
user |
The user defines the log creator of Event Record. |
3.8. OperatorLogEventCreate
Name | Description | Schema |
---|---|---|
assignedTo |
assigned user of the log event |
integer (int64) |
lineId |
lineId |
integer (int64) |
linkedEvents |
Linked events |
object |
logType |
Log Type defines the type of Log Event |
integer (int64) |
statusId |
status of the log event |
integer (int64) |
summary |
summary of the log event |
string |
unitId |
productionUnitId of Log Event |
integer (int64) |
3.9. PrivilegeSet
Name | Schema |
---|---|
category |
string |
description |
string |
displayName |
string |
icon |
string |
id |
integer (int32) |
scope |
string |
3.10. TemplateVariable
Name | Schema |
---|---|
description |
string |
name |
string |
type |
enum (, ?, &, /, #, *) |
3.11. UriTemplate
Name | Schema |
---|---|
variableNames |
< string > array |
variables |
< TemplateVariable > array |
3.12. UserSettingRequest
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} } |
object |
viewName |
string |
3.13. UserSettingResponseResource
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
object |
|
defaultSetting |
Example : |
boolean |
links |
< Link > array |
|
viewName |
string |
4. Security
4.1. access_token
Type : oauth2
Flow : accessCode
Token URL : https://10.181.213.59/uaa/oauth/authorize
Token URL : https://10.181.213.59/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.2. resource_owner
Type : oauth2
Flow : password
Token URL : https://10.181.213.59/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.3. implicit_grant
Type : oauth2
Flow : implicit
Token URL : https://10.181.213.59/uaa/oauth/authorize
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.4. client_creds
Type : oauth2
Flow : application
Token URL : https://10.181.213.59/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |