2. Resources
2.1. Reason-category-controller
Reason Category Controller
2.1.1. Creates a reason category
POST /ea/v1/reasoncategories
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
command |
ReasonCategoryDto object to create reasoncategory |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
406 |
Not_Acceptable |
No Content |
500 |
Internal Server Error |
2.1.2. Fetches all the reason categories
GET /ea/v1/reasoncategories
2.1.3. Fectches a reason category by category id
GET /ea/v1/reasoncategories/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Category id of reasonCategory to get reasoncategory |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
404 |
NOT_FOUND |
No Content |
500 |
Internal Server Error |
2.1.4. Updates a reason category by categoryId
PUT /ea/v1/reasoncategories/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Category id of resoncategory to update the reason category |
integer (int64) |
Body |
command |
ReasonCategoryDto object to create reasoncategory |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
406 |
Not_Acceptable |
|
500 |
Internal Server Error |
No Content |
2.1.5. Delete a reason category by category id
DELETE /ea/v1/reasoncategories/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Category id of reasoncategory to delete the reasoncategory |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
No Content |
401 |
Unauthorized |
No Content |
404 |
Not Found |
No Content |
500 |
Internal Server Error |
2.2. Reason-controller
Reason Controller
2.2.1. Creates a reason
POST /ea/v2/reasons
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
404 |
Not_Acceptable |
No Content |
500 |
Internal Server Error |
2.2.2. Fetches all reasons
GET /ea/v2/reasons
2.2.4. Fetches reason by reason id
GET /ea/v2/reasons/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Reason id of reason to get a reason |
integer (int64) |
2.2.5. Updates a reason by reason id
PUT /ea/v2/reasons/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Reason id of reason to update a reason |
integer (int64) |
Body |
command |
ReasonDto object to update a reason |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
404 |
Not_Acceptable |
No Content |
500 |
Internal Server Error |
2.2.6. Delete a reason by reasonId
DELETE /ea/v2/reasons/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
reasonId of reason to delete a reason |
integer (int64) |
2.3. Reason-tree-controller
Reason Tree Controller
2.3.1. Get reasonTree header by tree id
GET /ea/v1/reasontreebymachine/{id}/header
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
id |
Tree id of reason to get the reason tree header |
integer (int64) |
|
Query |
eventType |
The eventType can be 2-Downtime 3-Waste to get the reason tree nodes. Defatult 2-Downtime |
enum (Downtime, Waste) |
|
Query |
treeType |
The tree type can be 1-Reason 2-Action 3-NPT 4-UDE to get the reason tree header |
enum (Reason, Action, NPT, UDE) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< ReasonTreeHeaderDto > array |
406 |
Not_Acceptable |
|
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.3.2. Assign tree to machine by machine id
POST /ea/v1/reasontreebymachine/{machineId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
machineId |
The machine id to which assign the reasonTree |
integer (int64) |
Body |
command |
ReasonTreeShortDto object to assign the reasonTree |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
boolean |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
2.3.3. Fetches reason tree by machine id
GET /ea/v1/reasontreebymachine/{machineId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
machineId |
The machine id to which get the reasonTree |
integer (int64) |
2.3.4. Modify tree to machine by machine id
PUT /ea/v1/reasontreebymachine/{machineId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
machineId |
The machineId to which modify the reasonTree |
integer (int64) |
Body |
command |
ReasonTreeShortDto object to modify the reasonTree |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
boolean |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
2.3.5. Delete reason tree from machine by machine id
DELETE /ea/v1/reasontreebymachine/{machineId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
machineId |
The machine id to which delete the reasonTree |
integer (int64) |
Body |
command |
ReasonTreeShortDto object to delete the reasonTree |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
boolean |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
2.3.6. Fetches reason tree nodes by machine id
GET /ea/v1/reasontreebymachine/{machineId}/nodes
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
machineId |
The machine id of the unit to which get the reason tree nodes |
integer (int64) |
|
Query |
categoryId |
The category id of the reason to get the reason tree nodes |
integer (int64) |
|
Query |
eventType |
The eventType can be 2-Downtime 3-Waste to get the reason tree nodes. Defatult 2-Downtime |
enum (Downtime, Waste) |
|
Query |
levels |
The levels can be 1-level1 2-level2 3-level3 4-level4 of the reason to get the reason tree nodes |
integer (int32) |
|
Query |
treeType |
The treeType can be 1-Reason 2-Action 3-NPT 4-UDE to get the reason tree nodes |
enum (Reason, Action, NPT, UDE) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< ReasonTreeNode > array |
406 |
Not_Acceptable |
|
422 |
Unprocessable Entity |
|
500 |
Internal Server Error |
2.3.7. Fetches top N reasons by machine id
GET /ea/v1/reasontreebymachine/{machineId}/topNreason
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
machineId |
The machine id to which get the top N reason of reason tree |
integer (int64) |
|
Query |
eventType |
The eventType can be 2-Downtime 3-Waste to get the reason to N reason of tree nodes. Defatult 2-Downtime |
enum (Downtime, Waste) |
|
Query |
showTopNBars |
Show top N bars to the UI.The default value is 5. |
integer (int64) |
|
Query |
treeType |
The tree type 1-Reason 2-Action 3-NPT 4-UDE to get the top N reason of reason tree |
enum (Reason, Action, NPT, UDE) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< QuickPickReason > array |
406 |
Not_Acceptable |
|
422 |
Unprocessable Entity |
2.3.8. Create reason trees
POST /ea/v1/reasontrees
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
command |
ReasonTreeDto object to create reason tree |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
406 |
Not_Acceptable |
No Content |
500 |
Internal Server Error |
2.3.9. Fetches all reason trees
GET /ea/v1/reasontrees
2.3.10. Fetches reason tree by tree id
GET /ea/v1/reasontrees/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Tree id of reason tree to get reason tree |
integer (int64) |
2.3.11. Updates reason tree by reason id
PUT /ea/v1/reasontrees/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Reason id of reason tree to update reson tree |
integer (int64) |
Body |
command |
ReasonTreeDto object to create reason tree |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
406 |
Not_Acceptable |
No Content |
500 |
Internal Server Error |
2.3.12. Delete reason tree by tree id
DELETE /ea/v1/reasontrees/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Tree id of reason tree to delete reason tree |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
No Content |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
2.3.13. Creates a reasonTree Top N node
POST /ea/v1/reasontrees/{id}/nodes
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Tree id of reasonTree to create top N node of reason tree |
integer (int64) |
Body |
command |
ReasonTreeNodeShortDto object to create top N node of reason tree |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
406 |
Not Acceptable |
No Content |
500 |
Internal Server Error |
2.3.14. Fetches reason tree nodes by tree id
GET /ea/v1/reasontrees/{id}/nodes
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
treeId of reasonTree to get reason tree nodes |
integer (int64) |
Query |
categoryId |
The Category id of the reason tree to get reason tree nodes |
integer (int64) |
Query |
levels |
The levels can be 1-level1 2-level2 3-level3 4-level4 of the reason tree to get reasonTreeNodes |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< ReasonTreeNodeDto > array |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
2.3.15. Creates a reasonTree node by node id
POST /ea/v1/reasontrees/{id}/nodes/{nodeId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Tree id of reason trees to create reason tree node |
integer (int64) |
Path |
nodeId |
Node id of nodes to create reasonTree nodes |
integer (int64) |
Body |
command |
ReasonTreeNodeShortDto object to create reason tree node |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
406 |
Not Acceptable |
No Content |
500 |
Internal Server Error |
2.3.16. Fetches reason tree nodes by node id
GET /ea/v1/reasontrees/{id}/nodes/{nodeId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
Tree id of reasonTree to get reasonTree nodes |
integer (int64) |
Path |
nodeId |
Node id of the nodes to get reason tree nodes |
integer (int64) |
Query |
categoryId |
Category id of reason to get reason tree nodes |
integer (int64) |
Query |
levels |
The levels can be 1-level1 2-level2 3-level3 4-level4 of reasons to get reasonTree nodes |
integer (int32) |
2.3.17. Updates a reasonTree node category by node id
PUT /ea/v1/reasontrees/{id}/nodes/{nodeId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
treeId of reasonTrees to update reasonTreeNode category |
integer (int64) |
Path |
nodeId |
Node id of nodes to update reason tree node category |
integer (int64) |
Body |
command |
ReasonTreeNodeShortDto object to update reasonTreeNodes |
2.3.18. Delete a reasonTree node by node id
DELETE /ea/v1/reasontrees/{id}/nodes/{nodeId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
treeId of reasonTrees to delete reasonTreenode |
integer (int64) |
Path |
nodeId |
nodeId of node to delete reasonTreenode |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
No Content |
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
3. Definitions
3.4. QueryDTO«List«ReasonCategoryDto»»
Name | Schema |
---|---|
_embedded |
|
first |
boolean |
last |
boolean |
links |
< Link > array |
number |
integer (int32) |
numberOfElements |
integer (int32) |
size |
integer (int32) |
sort |
|
totalElements |
integer (int64) |
totalPages |
integer (int32) |
3.5. QueryDTO«List«ReasonDto»»
Name | Schema |
---|---|
_embedded |
|
first |
boolean |
last |
boolean |
links |
< Link > array |
number |
integer (int32) |
numberOfElements |
integer (int32) |
size |
integer (int32) |
sort |
|
totalElements |
integer (int64) |
totalPages |
integer (int32) |
3.6. QueryDTO«List«ReasonTreeDto»»
Name | Schema |
---|---|
_embedded |
|
first |
boolean |
last |
boolean |
links |
< Link > array |
number |
integer (int32) |
numberOfElements |
integer (int32) |
size |
integer (int32) |
sort |
|
totalElements |
integer (int64) |
totalPages |
integer (int32) |
3.7. QueryEmbeddedResourceDTO«List«ReasonCategoryDto»»
Name | Schema |
---|---|
resource |
< ReasonCategoryDto > array |
3.8. QueryEmbeddedResourceDTO«List«ReasonDto»»
Name | Schema |
---|---|
resource |
< ReasonDto > array |
3.9. QueryEmbeddedResourceDTO«List«ReasonTreeDto»»
Name | Schema |
---|---|
resource |
< ReasonTreeDto > array |
3.11. Reason
Name | Schema |
---|---|
reasonId |
integer (int64) |
reasonLocalName |
string |
reasonName |
string |
3.12. ReasonCategoryDto
Name | Description | Schema |
---|---|---|
categoryId |
The Unique identifier of this category |
integer (int64) |
categoryName |
The name of the category |
string |
links |
< Link > array |
3.13. ReasonDto
Name | Description | Schema |
---|---|---|
commentRequired |
flag to check if reason is mendatory |
boolean |
links |
< Link > array |
|
reasonId |
The unique identifier of the reason |
integer (int64) |
reasonName |
The name of the reason |
string |
3.14. ReasonTree
Name | Description | Schema |
---|---|---|
treeId |
Unique identifier for this tree |
integer (int64) |
treeLocalName |
The name of the local tree |
string |
treeName |
The name of the tree |
string |
3.15. ReasonTreeDto
Name | Description | Schema |
---|---|---|
links |
< Link > array |
|
nodes |
The List of the reasonTreeNode |
< ReasonTreeNodeDto > array |
treeId |
The Unique identifier of tree |
integer (int64) |
treeName |
The name of tree |
string |
3.16. ReasonTreeHeaderDto
Name | Description | Schema |
---|---|---|
levelName |
Name of the level can be 1-level1 2-level2 3-level3 4-level4 of a reason |
string |
reasonLevel |
The level can be 1-level1 2-level2 3-level3 4-level4 of the reason |
integer (int32) |
3.17. ReasonTreeNode
Name | Description | Schema |
---|---|---|
categoryId |
Unique identifier of this category |
integer (int64) |
categoryName |
The name of the category |
string |
categoryNodeId |
Unique identifier of this categoryNode |
integer (int64) |
commentRequired |
flag to check if reason is mendatory |
boolean |
level1Id |
Unique identifier of this level1 |
integer (int64) |
level2Id |
Unique identifier of this level2 |
integer (int64) |
level3Id |
Unique identifier of this level3 |
integer (int64) |
level4Id |
Unique identifier of this level4 |
integer (int64) |
nodeId |
Unique identifier of this node |
integer (int64) |
parentNodeId |
Unique identifier of this parent |
integer (int64) |
reasonId |
Unique identifier of this reason |
integer (int64) |
reasonLevel |
The level of the reason |
integer (int32) |
reasonName |
The name of the reason |
string |
treeId |
Unique identifier of this tree |
integer (int64) |
3.18. ReasonTreeNodeDto
Name | Description | Schema |
---|---|---|
categoryId |
The categoryId of the reason |
integer (int64) |
categoryName |
The category name of reason |
string |
children |
The List of the reasonTreeNode |
< ReasonTreeNodeDto > array |
commentRequired |
flag to check if reason is mendatory |
boolean |
links |
< Link > array |
|
nodeId |
The Unique identifier of node |
integer (int64) |
parentNodeId |
The Unique identifier of parentNode |
integer (int64) |
reasonId |
The Unique identifier of reason |
integer (int64) |
reasonLevel |
The level can be 1-level1 2-level2 3-level3 4-level4 of reason |
integer (int32) |
reasonName |
The name of the reason |
string |
treeId |
The Unique identifier of tree |
integer (int64) |
3.19. ReasonTreeNodeShortDto
Name | Description | Schema |
---|---|---|
categoryId |
The Unique identifier of category |
integer (int64) |
nodeId |
The Unique identifier of nodes |
integer (int64) |
reasonId |
The Unique identifier of resons |
integer (int64) |
userId |
The Unique Id of users |
integer (int32) |
4. Security
4.1. oauth
Type : oauth2
Flow : accessCode
Token URL : http://localhost:8080/uaa/oauth/authorize
Token URL : http://localhost:8080/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |