1. Overview

The service contains a collection of RESTful service calls to retrieve and update Alarm information relevant to manufacturing execution.

Descriptions of these functions can be found in the section headers for each collection of relevant resources.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • alarm-controller : Alarm Controller

  • alarm-sheet-controller : Alarm Sheet Controller

  • variable-controller : Variable Controller

2. Resources

2.1. Alarm-controller

Alarm Controller

2.1.1. Gets all the alarms based on the filters applied

GET /v1/alarms
Parameters
Type Name Description Schema Default

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

includeAcknowledged
optional

Whether to include acknoledged alarms as well

boolean

"false"

Query

includeClosed
optional

Whether to include closed (not empty end date) alarms as well

boolean

"false"

Query

priorities
optional

Comma seperated list of priorities to include:Low, Medium or High

string

"Low,Medium,High"

Query

sortColumn
optional

Property name on which sorting is to be done, supports sorting on only single property

string

"startTime"

Query

sortDirection
optional

Sort Direction, either asc or desc

string

"desc"

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

Time selection
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

unitIds
required

Unit Ids (Comma seperated)

string

Responses
HTTP Code Description Schema

200

OK

Resource«AlarmRecordDetails»

400

Bad Request, See message for details

HttpErrorResponse

403

Forbidden, Authenticated user not present in PlantApps Database

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.2. Fetches top reasons for the alarm

GET /v1/alarms/topReasons
Parameters
Type Name Description Schema Default

Query

alarmId
required

The alarmId for which top reasons are required

integer (int64)

Query

reasonType
required

Reason tree type to get the specified type of top reasons

enum (Action, Cause)

Query

topReasonsCount
optional

Required number of top reasons

integer (int64)

5

Responses
HTTP Code Description Schema

200

OK

TopNReasonsDtoResponse

400

Bad Request, See message for details

HttpErrorResponse

403

Forbidden, Authenticated user not present in PlantApps Database

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

oauth

default

2.1.3. Gets the alarm record for the alarm Id provided.

GET /v1/alarms/{alarmId}
Parameters
Type Name Description Schema

Path

alarmId
required

Alarm Id to retireve the Alarm Record

integer (int64)

Responses
HTTP Code Description Schema

200

OK

Resource«AlarmRecord»

404

Not Found, No Alarm found for this alarm Id

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.4. Updates the alarm record for the alarm Id provided.

PUT /v1/alarms/{alarmId}
Parameters
Type Name Description Schema

Path

alarmId
required

Alarm Id of the Alarm Record to update

integer (int64)

Query

acknowledge
optional

Whether to acknowledge the alarm

boolean

Body

alarmRecordUpdateData
optional

Alarm Record details to be updated

AlarmRecordUpdateData

Responses
HTTP Code Description Schema

200

OK

AlarmRecord

304

Not Modified, Request body values same as Data Base

HttpErrorResponse

400

Invalid data supplied. See message for details.

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found, No Alarm found for this alarm Id

HttpErrorResponse

422

Unprocessable Entity, Invalid data in the request body

HttpErrorResponse

500

Internal Server error, See logs for details

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.2. Alarm-sheet-controller

Alarm Sheet Controller

2.2.1. Gets the alarm sheets configured in PA that is authorized for this user, filtered either by the variableId or unitIds

GET /v1/alarmSheets
Parameters
Type Name Description Schema

Query

unitIds
optional

Unit Ids (Comma seperated) whose alarm sheets are to be retrieved

string

Query

variableId
optional

Variable Id to retrieve the alarm sheets where this variable is configured

integer (int64)

Responses
HTTP Code Description Schema

200

OK

AlarmSheetResponse

400

Bad Request, See message for details

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden, No authorized alarm sheets for user in Plant Apps

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.3. Variable-controller

Variable Controller

2.3.1. Gets the alarm Variable Details for the provided alarm Id.

GET /v1/sourceVariableDetails
Parameters
Type Name Description Schema

Query

alarmId
required

Alarm Id to retireve the alarm Variable Details

integer (int64)

Responses
HTTP Code Description Schema

200

OK

Resource«VariableDetails»

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

3. Definitions

3.1. AlarmCountInfo

Object to hold various alarm counts

Name Description Schema

acknowledgedAlarmCount
optional

Number of acknowledged alarms

integer (int64)

highPriorityAlarmCount
optional

Number of high alarms

integer (int64)

lowPriorityAlarmCount
optional

Number of low alarms

integer (int64)

mediumPriorityAlarmCount
optional

Number of medium alarms

integer (int64)

nonAcknowledgedAlarmCount
optional

Number of unacknowledged alarms

integer (int64)

totalAlarmCount
optional

Total number of alarms

integer (int64)

3.2. AlarmRecord

Alarm Record Object

Name Description Schema

acknowledged
optional

Whether this alarm is acknowledged or not
Example : false

boolean

acknowledgedBy
optional

Name of the user who acknowledged this alarm

string

acknowledgedOn
optional

Time when this alarm was acknowledged on(ISO 8601)

string (date-time)

action1
optional

The level 1 action taken for on regard to this alarm

IdNameValue

action2
optional

The level 2 action taken for on regard to this alarm

IdNameValue

action3
optional

The level 3 action taken for on regard to this alarm

IdNameValue

action4
optional

The level 4 action taken for on regard to this alarm

IdNameValue

actionCommentId
optional

The comment thread Id for action

integer (int64)

actionRequired
optional

Whether this alarm record requires actions to be selected
Example : false

boolean

actionTreeId
optional

The reason tree Id which is configured as action tree for this alarms template

integer (int64)

alarmDescription
optional

The description for this alarm

string

alarmId
optional

The unique ID for this Alarm Record

integer (int64)

alarmRule
optional

The title of the Alarm Template this alarm is based on

string

alarmType
optional

The Alarm Type

IdNameValue

canAcknowledge
optional

Whether this alarm record can be acknoledged
Example : false

boolean

canPerform
optional

Whether this alarm record can be editied to add cause and actions
Example : false

boolean

cause1
optional

The level 1 cause why this alarm has been raised

IdNameValue

cause2
optional

The level 2 cause why this alarm has been raised

IdNameValue

cause3
optional

The level 3 cause why this alarm has been raised

IdNameValue

cause4
optional

The level 4 cause why this alarm has been raised

IdNameValue

causeCommentId
optional

The comment thread Id for cause

integer (int64)

causeRequired
optional

Whether this alarm record requires causes to be selected
Example : false

boolean

causeTreeId
optional

The reason tree Id which is configured as cause tree for this alarms template

integer (int64)

duration
optional

The duration (in seconds) this alarm spans from starting to end

integer (int64)

endTime
optional

The end time(ISO 8601) of this alarm

string (date-time)

endValue
optional

Value of the variable’s test when the Alarm is closed

object

eventCount
optional

Number of event this alarm spans after alarm is triggered and until its ends

integer (int64)

eventSubTypeDescription
optional

The event SubType Description, eg Batch

string

links
optional

< Link > array

priority
optional

The severity of this alarm

IdNameValue

sourceUnit
optional

The unit where the alarm is raised

IdNameValue

sourceVariable
optional

The variable for which the alarm got raised

IdNameValue

sourceVariableDataType
optional

Data type of the alarm source veriable (ex. Integer, String..)

IdNameValue

startTime
optional

The start time(ISO 8601) of this alarm

string (date-time)

startValue
optional

Value of the variable’s test when the Alarm is opened

object

3.3. AlarmRecordDetails

Object to hold List of alarm records and count information of that alarms

Name Description Schema

alarmCountInfo
optional

Object that holds various count info of the alarm record list

AlarmCountInfo

alarmRecords
optional

List of Alarm Records

< AlarmRecord > array

3.4. AlarmRecordUpdateData

Object to hold data for updating the alarm record

Name Description Schema

acknowledge
optional

Whether this alarm is acknowledged or not
Example : false

boolean

action1
optional

The level 1 action taken for on regard to this alarm

integer (int64)

action2
optional

The level 2 action taken for on regard to this alarm

integer (int64)

action3
optional

The level 3 action taken for on regard to this alarm

integer (int64)

action4
optional

The level 4 action taken for on regard to this alarm

integer (int64)

cause1
optional

The level 1 cause why this alarm has been raised

integer (int64)

cause2
optional

The level 2 cause why this alarm has been raised

integer (int64)

cause3
optional

The level 3 cause why this alarm has been raised

integer (int64)

cause4
optional

The level 4 cause why this alarm has been raised

integer (int64)

3.5. AlarmSheetRecord

Object that holds alarm sheet related details

Name Description Schema

sheetId
optional

The Unique ID for this alarm sheet record

integer (int64)

variables
optional

List of variables under this alarm sheet

< VariableRecord > array

3.6. AlarmSheetResponse

Name Schema

content
optional

< AlarmSheetRecord > array

links
optional

< Link > array

3.7. Error

Name Description Schema

code
optional

string

details
optional

Details of this error

object

3.8. HttpErrorResponse

Error response object to send to the client

Name Description Schema

error
optional

Details of the error which returned this response

Error

path
optional

URL of rest resource which responded with this response

string

timestamp
optional

Time when this error is thrown

string

3.9. IdNameValue

Generic object to hold Id value pair

Name Description Schema

id
optional

ID for thos pair

integer (int64)

name
optional

Name of this pair

string

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.11. ReasonDto

Name Description Schema

reasonId
optional

The unique identifier of the reason

integer (int64)

reasonName
optional

The name of the reason

string

3.12. Resource«AlarmRecordDetails»

Name Description Schema

alarmCountInfo
optional

Object that holds various count info of the alarm record list

AlarmCountInfo

alarmRecords
optional

List of Alarm Records

< AlarmRecord > array

links
optional

< Link > array

3.13. Resource«AlarmRecord»

Name Description Schema

acknowledged
optional

Whether this alarm is acknowledged or not
Example : false

boolean

acknowledgedBy
optional

Name of the user who acknowledged this alarm

string

acknowledgedOn
optional

Time when this alarm was acknowledged on(ISO 8601)

string (date-time)

action1
optional

The level 1 action taken for on regard to this alarm

IdNameValue

action2
optional

The level 2 action taken for on regard to this alarm

IdNameValue

action3
optional

The level 3 action taken for on regard to this alarm

IdNameValue

action4
optional

The level 4 action taken for on regard to this alarm

IdNameValue

actionCommentId
optional

The comment thread Id for action

integer (int64)

actionRequired
optional

Whether this alarm record requires actions to be selected
Example : false

boolean

actionTreeId
optional

The reason tree Id which is configured as action tree for this alarms template

integer (int64)

alarmDescription
optional

The description for this alarm

string

alarmId
optional

The unique ID for this Alarm Record

integer (int64)

alarmRule
optional

The title of the Alarm Template this alarm is based on

string

alarmType
optional

The Alarm Type

IdNameValue

canAcknowledge
optional

Whether this alarm record can be acknoledged
Example : false

boolean

canPerform
optional

Whether this alarm record can be editied to add cause and actions
Example : false

boolean

cause1
optional

The level 1 cause why this alarm has been raised

IdNameValue

cause2
optional

The level 2 cause why this alarm has been raised

IdNameValue

cause3
optional

The level 3 cause why this alarm has been raised

IdNameValue

cause4
optional

The level 4 cause why this alarm has been raised

IdNameValue

causeCommentId
optional

The comment thread Id for cause

integer (int64)

causeRequired
optional

Whether this alarm record requires causes to be selected
Example : false

boolean

causeTreeId
optional

The reason tree Id which is configured as cause tree for this alarms template

integer (int64)

duration
optional

The duration (in seconds) this alarm spans from starting to end

integer (int64)

endTime
optional

The end time(ISO 8601) of this alarm

string (date-time)

endValue
optional

Value of the variable’s test when the Alarm is closed

object

eventCount
optional

Number of event this alarm spans after alarm is triggered and until its ends

integer (int64)

eventSubTypeDescription
optional

The event SubType Description, eg Batch

string

links
optional

< Link > array

priority
optional

The severity of this alarm

IdNameValue

sourceUnit
optional

The unit where the alarm is raised

IdNameValue

sourceVariable
optional

The variable for which the alarm got raised

IdNameValue

sourceVariableDataType
optional

Data type of the alarm source veriable (ex. Integer, String..)

IdNameValue

startTime
optional

The start time(ISO 8601) of this alarm

string (date-time)

startValue
optional

Value of the variable’s test when the Alarm is opened

object

3.14. Resource«VariableDetails»

Name Description Schema

links
optional

< Link > array

variableDataType
optional

Data type of the veriable (ex. Integer, String..)

IdNameValue

variableEngUnit
optional

The engineerng unit of the variable (ex. Kg, Lux..)

string

variableHistoryEndTime
optional

Variable History End Time

string (date-time)

variableHistoryStartTime
optional

Variable History Start Time

string (date-time)

variableId
optional

The source variable ID of Alarm Record

integer (int64)

variableName
optional

The Name of the variable on which the alarm is raised

string

variableTrigger
optional

The Id value pair of the trigger of this variable that raised alarm

IdNameValue

3.15. TopNReasonsDto

Name Description Schema

level1
optional

The level1 of reason

ReasonDto

level2
optional

The level2 of reason

ReasonDto

level3
optional

The level3 of reason

ReasonDto

level4
optional

The level4 of reason

ReasonDto

3.16. TopNReasonsDtoResponse

Name Schema

content
optional

< TopNReasonsDto > array

links
optional

< Link > array

3.17. VariableDetails

Alarms source variable information dto object

Name Description Schema

links
optional

< Link > array

variableDataType
optional

Data type of the veriable (ex. Integer, String..)

IdNameValue

variableEngUnit
optional

The engineerng unit of the variable (ex. Kg, Lux..)

string

variableHistoryEndTime
optional

Variable History End Time

string (date-time)

variableHistoryStartTime
optional

Variable History Start Time

string (date-time)

variableId
optional

The source variable ID of Alarm Record

integer (int64)

variableName
optional

The Name of the variable on which the alarm is raised

string

variableTrigger
optional

The Id value pair of the trigger of this variable that raised alarm

IdNameValue

3.18. VariableRecord

Object to hold variable related details

Name Description Schema

unitId
optional

Id of the Unit that this variable record belongs to

integer (int64)

variableId
optional

Unique Id of this variable record

integer (int64)

4. Security

4.1. oauth

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

Name Description

default

Default oauth2 scope.