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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.2. get unit list

GET /v1/datamodel/unit
Parameters
Type Name Description Schema

Query

lineId
optional

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

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
optional

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.2. Creates a new event

POST /v1/operatorLogEvents/events
Parameters
Type Name Description Schema

Body

eventRecord
required

Log EventRecord object to add a new event

OperatorLogEventCreate

Responses
HTTP Code Description Schema

201

Created

OperatorLogEvent

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

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

GET /v1/operatorLogEvents/events
Parameters
Type Name Description Schema

Query

assignTo
optional

assign to

string

Query

endTime
optional

End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

eventType
optional

eventType

enum (LogEntries, Incidents, HandOffs)

Query

line
optional

List of Line Id’s, Can also set comma seperated Line ids

string

Query

startTime
optional

Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

status
optional

status

enum (Open, InProgress, Closed)

Query

timeSelection
required

timeSelection

enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift)

Query

unit
optional

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.4. Get Activities Events

GET /v1/operatorLogEvents/getActivitiesEvents
Parameters
Type Name Description Schema

Query

endTime
optional

End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

eventTypes
optional

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
required

Line Id

string

Query

startTime
optional

Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

timeSelection
required

timeSelection

enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift)

Query

unit
optional

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.5. Get Downtime Events

GET /v1/operatorLogEvents/getDowntimeEvents
Parameters
Type Name Description Schema

Query

endTime
optional

End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

line
required

Line Id

string

Query

startTime
optional

Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

timeSelection
required

timeSelection

enum (CurrentDay, PreviousDay, CurrentWeek, PreviousWeek, NextWeek, NextDay, Custom, CurrentShift, PreviousShift, NextShift)

Query

unit
optional

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.6. Fetches Events by id

GET /v1/operatorLogEvents/id
Parameters
Type Name Description Schema

Query

Id
required

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.7. fetches the timeselect

GET /v1/operatorLogEvents/timeSelection
Parameters
Type Name Description Schema

Query

endTime
optional

End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

startTime
optional

Start time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ)

string (date-time)

Query

timeSelection
required

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

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.8. updating the status

PUT /v1/operatorLogEvents/updateStatus
Parameters
Type Name Description Schema

Body

eventRecord
required

Log EventRecord Object to update the status

OperateLogEventUpdate

Responses
HTTP Code Description Schema

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

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.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
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.3.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.3.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.3.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.3.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. BaseResponse

Name Schema

data
optional

object

links
optional

< Link > array

message
optional

string

statusCode
optional

integer (int32)

3.2. Error

Name Schema

code
optional

string

details
optional

object

3.3. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.4. IdNameValue

Name Description Schema

id
optional

The unique ID of the entity

integer (int64)

name
optional

The name of the entity

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

3.6. OperateLogEventUpdate

Name Description Schema

logDetailId
optional

Log DetailsId defines the logtypeID

integer (int64)

statusId
optional

status of the log event

integer (int64)

3.7. OperatorLogEvent

Name Description Schema

assignedTo
optional

assigned user of the log event

IdNameValue

cause1
optional

The Level 1 Cause (Reason) of the Event record.

IdNameValue

cause2
optional

The Level 2 Cause (Reason) of the Event record.

IdNameValue

cause3
optional

The Level 3 Cause (Reason) of the Event record.

IdNameValue

cause4
optional

The Level 4 Cause (Reason) of the Event record.

IdNameValue

comment
optional

comment id of the log event

IdNameValue

endTime
optional

The end time of the log event

string (date-time)

entryOn
optional

The entry on time of the log event

string (date-time)

line
optional

productionLineId of Log Event

IdNameValue

linkedEvents
optional

Linked events

object

logDetailId
optional

Unique identifier of this Log Event record

integer (int64)

logType
optional

Log Type defines the type of Log Event

IdNameValue

sourceProductionUnitId
optional

sourceProductionUnitId od Log Event

integer (int64)

startTime
optional

The start time of the log event starts

string (date-time)

statusId
optional

status of the log event

IdNameValue

summary
optional

summary of the log event

string

unit
optional

productionUnitId of Log Event

IdNameValue

user
optional

The user defines the log creator of Event Record.

IdNameValue

3.8. OperatorLogEventCreate

Name Description Schema

assignedTo
optional

assigned user of the log event

integer (int64)

lineId
optional

lineId

integer (int64)

linkedEvents
optional

Linked events

object

logType
optional

Log Type defines the type of Log Event

integer (int64)

statusId
optional

status of the log event

integer (int64)

summary
optional

summary of the log event

string

unitId
optional

productionUnitId of Log Event

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. 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.13. 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 : 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.