1. Overview
Microservice containing the business logic for managing templates of approvalcockpit .
1.2. Tags
-
activity-controller : Activity Controller
-
line-controller : Line Controller
-
unit-controller : Unit Controller
-
user-controller : User Controller
-
user-groups-controller : User Groups Controller
-
user-settings-controller : User Settings Controller
-
workflow-configuration-controller : Workflow Configuration Controller
-
workflow-event-controller : Workflow Event Controller
-
workflow-execution-controller : Workflow Execution Controller
-
workflow-level-group-execution-controller : Workflow Level Group Execution Controller
2. Resources
2.1. Activity-controller
Activity Controller
2.1.1. Fetches List of activities containing their variable counts
GET /v1/activities/{id}/activityVariableCounts
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.2. Line-controller
Line Controller
2.2.1. Get all the lines
GET /v1/lines
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< LineData > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.3. Unit-controller
Unit Controller
2.3.1. Units of all lines
GET /v1/units
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< UnitsData > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.4. User-controller
User Controller
2.4.1. Get all the Users
GET /v1/users
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< UserInfo > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.5. User-groups-controller
User Groups Controller
2.5.1. Get all the groups
GET /v1/groups
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< GroupData > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.6. User-settings-controller
User Settings Controller
2.6.1. Create User settings for the logged in user
POST /v2/settings
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 |
2.6.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 |
2.6.3. Update User settings for the logged in user
PUT /v2/settings
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 |
2.6.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 |
object |
400 |
Invalid data supplied |
|
401 |
User Unauthorized |
No Content |
404 |
Not Found, User Setting not found |
|
500 |
Internal Server Error |
2.6.5. Get Privilege Sets
GET /v2/settings/apps
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 |
2.7. Workflow-configuration-controller
Workflow Configuration Controller
2.7.1. Create WorkFlow Configurations
POST /v1/workflow-configurations
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
workflowConfigurationRequest |
workflowConfigurationRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
409 |
Workflow with that name already exists |
|
500 |
Internal Server error |
2.7.2. Query Workflow Configurations
GET /v1/workflow-configurations
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
eventId |
Event id of the configurtion (Refer API /eventType ) |
integer (int32) |
|
Query |
page |
Results page you want to retrieve (0..N) |
integer (int32) |
|
Query |
size |
Number of records per page. |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.7.3. Query Workflow details
GET /v1/workflow-configurations/{id}
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.7.4. Update WorkFlow Configurations
PUT /v1/workflow-configurations/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Workflow Configuration Id. |
integer (int64) |
Body |
workflowConfigurationRevisionRequest |
workflowConfigurationRevisionRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.7.5. Active workflow configurations
PUT /v1/workflow-configurations/{id}/active
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
No Content |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.7.6. Add Co-Owner
PUT /v1/workflow-configurations/{id}/co-owner
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow configuration |
integer (int64) |
Body |
coOwnerRequest |
coOwnerRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.7.7. Inactive workflow configurations
PUT /v1/workflow-configurations/{id}/in-active
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
No Content |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.8. Workflow-event-controller
Workflow Event Controller
2.8.1. Query Workflow Events
GET /v1/workflow-events
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WorkflowEventInfo > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9. Workflow-execution-controller
Workflow Execution Controller
2.9.1. Approve Workflow Execution
POST /v1/workflow-executions/{id}/approve
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Body |
request |
request |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
No Content |
object |
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9.2. Approval Details
GET /v1/workflow-executions/{id}/level-groups
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< ExecutionDetails > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9.3. Add monitor group
POST /v1/workflow-executions/{id}/monitor-group
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Body |
monitorGroupRequest |
monitorGroupRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9.4. Update monitor group
PUT /v1/workflow-executions/{id}/monitor-group/{monitor-group-id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Path |
monitor-group-id |
monitor-group-id |
integer (int64) |
Body |
monitorGroupRequest |
monitorGroupRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9.5. Reject Workflow Execution
POST /v1/workflow-executions/{id}/reject
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Body |
request |
request |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
No Content |
object |
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.9.6. Reverify of the approved workflow
POST /v1/workflow-executions/{id}/reverify
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Id of the workflow execution. |
integer (int64) |
Body |
rerequest |
rerequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
204 |
No Content |
object |
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
2.10. Workflow-level-group-execution-controller
Workflow Level Group Execution Controller
2.10.1. Query Workflow Level Groups Execution Details
GET /v1/workflow-level-group-executions
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
level |
Level of the execution as a filter. |
integer (int32) |
|
Query |
onlyMyWorkflows |
Currently logged in user’s executions as a filter. |
boolean |
|
Query |
page |
Results page you want to retrieve (0..N) |
integer (int32) |
|
Query |
size |
Number of records per page. |
integer (int32) |
|
Query |
status |
status |
< enum (Pending, InProgress, Approved, Rejected) > array(multi) |
|
Query |
workflowExecutionId |
Id of the workflow execution as a filter |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
3. Definitions
3.1. ActivitiesVariableCountsResource
Name | Schema |
---|---|
content |
< ActivityVariableCounts > array |
links |
< Link > array |
3.2. ActivityVariableCounts
Name | Schema |
---|---|
activity |
|
eventId |
integer (int64) |
eventType |
enum (TimeBasedEvent, ProductionEvent, UserDefinedEvent, ProductChangeEvent) |
remainingMandatoryVariablesCount |
integer (int32) |
totalMandatoryVariablesCount |
integer (int32) |
totalVariablesCount |
integer (int32) |
3.5. ExecutionDetails
Name | Schema |
---|---|
groupinfo |
< GroupStatusInfo > array |
levelId |
integer (int32) |
levelName |
string |
3.6. Group
Name | Schema |
---|---|
groupName |
string |
groupType |
string |
securityGroups |
< string > array |
3.7. GroupData
Name | Description | Schema |
---|---|---|
description |
The description of the group |
string |
displayName |
The name of the group |
string |
3.8. GroupInfo
Name | Schema |
---|---|
groupName |
string |
groupType |
string |
groupTypeId |
integer (int32) |
levelGroupConfigId |
integer (int64) |
securityGroups |
< SecurityGroup > array |
3.9. GroupStatusInfo
Name | Description | Schema |
---|---|---|
groupName |
string |
|
groupType |
string |
|
lastModifiedBy |
string |
|
lastModifiedOn |
string (date-time) |
|
recievedReverification |
Example : |
boolean |
status |
string |
3.11. IdNameValue
Name | Description | Schema |
---|---|---|
id |
Unique identifier of this id of every pair/used across several services to represent a generic Id |
integer (int64) |
name |
Unique identifier of this name of every pair/used across several services to represent a generic name |
string |
3.12. Level
Name | Schema |
---|---|
escalationDueDays |
integer (int32) |
groups |
< Group > array |
name |
string |
sequence |
integer (int32) |
3.13. LevelInfo
Name | Schema |
---|---|
escalationDueDays |
integer (int32) |
groups |
< GroupInfo > array |
name |
string |
sequence |
integer (int32) |
3.14. LineData
Name | Description | Schema |
---|---|---|
lineId |
The assetId of the unit |
integer (int64) |
lineName |
The name of the unit |
string |
3.17. MonitorGroupInfo
Name | Schema |
---|---|
createdBy |
string |
createdOn |
string (date-time) |
groupName |
string |
id |
integer (int32) |
securityGroupName |
string |
3.19. MonitorGroupResponse
Name | Schema |
---|---|
createdBy |
string |
createdOn |
string (date-time) |
id |
integer (int64) |
lastModifiedBy |
string |
lastModifiedOn |
string (date-time) |
name |
string |
securityGroupName |
string |
workflowExecutionId |
integer (int64) |
3.20. PageMetadata
Name | Schema |
---|---|
number |
integer (int64) |
size |
integer (int64) |
totalElements |
integer (int64) |
totalPages |
integer (int64) |
3.21. PrivilegeSet
Name | Schema |
---|---|
category |
string |
description |
string |
displayName |
string |
icon |
string |
id |
integer (int32) |
scope |
string |
3.22. ReverifyRequest
Name | Schema |
---|---|
levelGroupExecutionIds |
< integer (int64) > array |
levelId |
integer (int32) |
3.23. RevisionGroup
Name | Schema |
---|---|
groupName |
string |
groupType |
string |
levelGroupConfigId |
integer (int64) |
securityGroups |
< RevisionSecurityGroup > array |
3.24. RevisionLevel
Name | Schema |
---|---|
escalationDueDays |
integer (int32) |
groups |
< RevisionGroup > array |
name |
string |
sequence |
integer (int32) |
3.25. RevisionMonitorGroup
Name | Schema |
---|---|
groupName |
string |
id |
integer (int32) |
securityGroupName |
string |
3.27. SecurityGroup
Name | Schema |
---|---|
createdBy |
string |
createdOn |
string (date-time) |
id |
integer (int32) |
name |
string |
3.28. UnitsData
Name | Description | Schema |
---|---|---|
assetId |
The assetId of the unit |
integer (int64) |
name |
The name of the unit |
string |
3.30. UserSettingRequest
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} } |
object |
viewName |
string |
3.31. UserSettingResource
Name | Description | Schema |
---|---|---|
appId |
integer (int32) |
|
data |
object |
|
defaultSetting |
Example : |
boolean |
links |
< Link > array |
|
viewName |
string |
3.32. Workflow Configuration Create Info
Workflow data tranfer object for creation.
Name | Schema |
---|---|
equipmentId |
integer (int64) |
eventId |
integer (int32) |
levels |
< Level > array |
lineId |
integer (int64) |
monitorGroup |
|
name |
string |
3.33. WorkflowConfigurationInfo
Name | Schema |
---|---|
active |
boolean |
coOwner |
string |
createdBy |
string |
createdOn |
string (date-time) |
equipementId |
integer (int64) |
id |
integer (int64) |
lastModifiedBy |
string |
lastModifiedOn |
string (date-time) |
lineId |
integer (int64) |
lineName |
string |
name |
string |
revision |
integer (int32) |
wfEventName |
string |
3.34. WorkflowConfigurationInfoResponse
Name | Schema |
---|---|
equipmentId |
integer (int32) |
eventId |
integer (int32) |
levels |
< LevelInfo > array |
lineId |
integer (int64) |
monitorGroup |
|
name |
string |
3.35. WorkflowConfigurationInfosPage
Name | Schema |
---|---|
content |
< WorkflowConfigurationInfo > array |
links |
< Link > array |
page |
3.36. WorkflowConfigurationRevisionRequest
Name | Schema |
---|---|
levels |
< RevisionLevel > array |
monitorGroup |
3.37. WorkflowEventInfo
Name | Schema |
---|---|
eventType |
string |
id |
integer (int32) |
name |
string |
3.39. WorkflowExecutionsPage
Name | Schema |
---|---|
content |
< WorkflowLevelGroupExecutionInfo > array |
links |
< Link > array |
page |
3.40. WorkflowLevelGroupExecution
Name | Schema |
---|---|
activityId |
integer (int64) |
groupName |
string |
groupType |
string |
id |
integer (int64) |
levelGroupCreatedOn |
string (date-time) |
levelId |
integer (int32) |
levelName |
string |
monitorGroupId |
integer (int64) |
monitorSecurityGroup |
string |
requestId |
string |
requestName |
string |
revision |
integer (int32) |
status |
string |
workflowExecutionId |
integer (int64) |
workflowLevelGroupExecutionId |
integer (int64) |
workflowName |
string |
workflowStartedBy |
string |
workflowStartedOn |
string (date-time) |
3.41. WorkflowLevelGroupExecutionInfo
Name | Description | Schema |
---|---|---|
activityId |
integer (int64) |
|
groupName |
string |
|
groupType |
string |
|
id |
integer (int64) |
|
levelGroupCreatedOn |
string (date-time) |
|
levelId |
integer (int32) |
|
levelName |
string |
|
monitorGroupId |
integer (int64) |
|
monitorSecurityGroup |
string |
|
recievedReverification |
Example : |
boolean |
requestId |
string |
|
requestName |
string |
|
revision |
integer (int32) |
|
status |
string |
|
workflowExecutionId |
integer (int64) |
|
workflowLevelGroupExecutionId |
integer (int64) |
|
workflowName |
string |
|
workflowStartedBy |
string |
|
workflowStartedOn |
string (date-time) |
3.42. WorkflowLevelGroupExecutionInfoPage
Name | Schema |
---|---|
content |
< WorkflowLevelGroupExecution > array |
links |
< Link > array |
page |
4. Security
4.1. access_token
Type : oauth2
Flow : accessCode
Token URL : https://10.181.213.181/uaa/oauth/authorize
Token URL : https://10.181.213.181/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.2. resource_owner
Type : oauth2
Flow : password
Token URL : https://10.181.213.181/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.3. implicit_grant
Type : oauth2
Flow : implicit
Token URL : https://10.181.213.181/uaa/oauth/authorize
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.4. client_creds
Type : oauth2
Flow : application
Token URL : https://10.181.213.181/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |