1. Overview
The service contains a collection of RESTful service calls to retrieve and update Waste management domain related information in PA 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
-
locations-controller : Locations Controller
-
waste-event-faults-controller : Waste Event Faults Controller
-
waste-event-types-controller : Waste Event Types Controller
-
waste-events-controller : Waste Events Controller
-
waste-measurements-controller : Waste Measurements Controller
-
waste-unit-config-controller : Waste Unit Config Controller
2. Resources
2.1. Locations-controller
Locations Controller
2.1.1. Get waste locations by masterUnitId
GET /v1/locations
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
masterUnitId |
master Unit id to get locations |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
|
404 |
Record Not Found |
|
500 |
Internal Server Error |
|
503 |
Service Unavailable |
Produces
-
application/json
2.2. Waste-event-faults-controller
Waste Event Faults Controller
2.2.1. Get all Waste Event Faults
GET /v1/wasteEventFaults
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
sourceUnitId |
sourceUnitId to get WasteFault Details |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WasteEventFaultRecord > array |
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
503 |
Service Unavailable |
Produces
-
application/json
-
application/vnd.ge.mes.v1.full+json
2.2.2. Get Waste Fault by id
GET /v1/wasteEventFaults/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.3. Waste-event-types-controller
Waste Event Types Controller
2.3.1. Get all Waste Event Types
GET /v1/wasteEventTypes
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
wasteEventTypeId |
wasteEventTypeId to get WasteEventType Details |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WasteEventTypeRecord > array |
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
503 |
Service Unavailable |
Produces
-
application/json
-
application/vnd.ge.mes.v1.full+json
2.4. Waste-events-controller
Waste Events Controller
2.4.1. Create waste event record
POST /v1/wasteEvents
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
wasteEventCreateRequest |
wasteEventCreateRequest |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Consumes
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.create+json
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.4.2. Gets the waste events generated or created in PA
GET /v1/wasteEvents
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
associatedProductionEventId |
To filter waste events for a Production Event |
integer (int64) |
|
Query |
endTime |
End time (incase of timeSelection = 7) in ISO 8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ) |
string (date-time) |
|
Query |
includeProductionEventBased |
Whether to include production event based waste events. By default would include |
boolean |
|
Query |
includeTimeBased |
Whether to include time based waste events. By default would include |
boolean |
|
Query |
pageNumber |
Page number to return, Zero based. Default to 0 |
integer (int64) |
|
Query |
pageSize |
Number of resources to return per page Default to 20 |
integer (int64) |
|
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, prevDay, currentWeek, prevWeek, nextWeek, nextDay, custom, currentShift, previousShift, nextShift) |
|
Query |
unitIds |
List of Unit Ids, Can also set comma seperated unit ids for this property |
< integer (int64) > array(multi) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Gets the waste events generated or created in PA |
No Content |
500 |
Internal Server error, error occurred. See message for details |
No Content |
Produces
-
application/json;charset=UTF-8
2.4.3. Get permissions
GET /v1/wasteEvents/permissions/{unitId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
unitId |
unitId |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< Permission > array |
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.4.4. Get waste event
GET /v1/wasteEvents/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.4.5. Update waste event record
PUT /v1/wasteEvents/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id |
integer (int64) |
Body |
wasteEventUpdate |
wasteEventUpdate |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Consumes
-
application/json
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.4.6. Delete waste event by Id
DELETE /v1/wasteEvents/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
string |
400 |
Invalid data supplied. See message for details. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
|
503 |
Service Unavailable |
Produces
-
/
2.4.7. Get Waste Event History Records based on Waste Event Id
GET /v1/wasteEvents/{wasteId}/history
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
wasteId |
wasteId |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WasteEvent > array |
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
503 |
Service Unavailable |
Produces
-
application/json;charset=UTF-8
-
application/vnd.ge.mes.v1.full+json
2.5. Waste-measurements-controller
Waste Measurements Controller
2.5.1. Get all Waste Measurements
GET /v1/wasteMeasurements
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
masterUnitId |
masterUnitId to get Waste Measurement Details |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< WasteMeasurementRecord > array |
Produces
-
application/json
-
application/vnd.ge.mes.v1.full+json
2.5.2. Get Waste Measurement by id
GET /v1/wasteMeasurements/{id}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
id to get Waste Measurement Details |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
Produces
-
application/json
-
application/vnd.ge.mes.v1.full+json
2.6. Waste-unit-config-controller
Waste Unit Config Controller
2.6.1. Get all Waste Unit Configurations
GET /v1/wasteEventUnitConfiguration
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
sourceUnitIds |
sourceUnitIds |
< integer (int64) > array(multi) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
ok |
Produces
-
application/json
-
application/vnd.ge.mes.v1.full+json
3. Definitions
3.1. Error
Name | Schema |
---|---|
code |
string |
details |
object |
3.2. ExtendedWasteEvent
Name | Description | Schema |
---|---|---|
actionCommentId |
The comment thread Id for action |
integer (int64) |
actionLevel1Id |
The level 1 action taken on regard to this waste event record |
integer (int64) |
actionLevel2Id |
The level 2 action taken on regard to this waste event record |
integer (int64) |
actionLevel3Id |
The level 3 action taken on regard to this waste event record |
integer (int64) |
actionLevel4Id |
The level 4 action taken on regard to this waste event record |
integer (int64) |
amount |
Amount of waste generated during this waste event |
number (double) |
amountConversionDivisor |
Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value. |
number (double) |
associatedProductionEventId |
The Production Event id this waste event is associated to in case this is an Event based waste |
integer (int64) |
associatedProductionEventNum |
The Production Event Number this waste event is associated to in case this is an Event based waste |
string |
causeCommentId |
The comment thread Id for cause |
integer (int64) |
confirmed |
Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions) |
boolean |
entryOn |
The time when this record was inserted in PA DB |
string (date-time) |
links |
< Link > array |
|
masterUnitId |
The master unit where this waste is produced |
integer (int64) |
permissions |
< Permission > array |
|
productId |
Product which ended up as waste |
integer (int64) |
reasonLevel1Id |
The level 1 reason what caused this waste |
integer (int64) |
reasonLevel2Id |
The level 2 reason what caused this waste |
integer (int64) |
reasonLevel3Id |
The level 3 reason what caused this waste |
integer (int64) |
reasonLevel4Id |
The level 4 reason what caused this waste |
integer (int64) |
sourceUnitId |
The exact unit Id (slave or master) where this waste is produced |
integer (int64) |
timestamp |
The time(ISO 8601) when this waste is generated |
string (date-time) |
user |
User who raised this waste event |
string |
wasteEventFaultId |
Fault associated with this waste event |
integer (int64) |
wasteEventId |
The unique ID for this Waste Event |
integer (int64) |
wasteEventTypeId |
Waste Event Type which this waste event comes under |
integer (int64) |
wasteMeasurementId |
Waste Measurement used to measure the waste amount |
integer (int64) |
3.3. HttpErrorResponse
Name | Schema |
---|---|
error |
|
path |
string |
timestamp |
string |
3.4. Link
Name | Schema |
---|---|
deprecation |
string |
href |
string |
hreflang |
string |
media |
string |
rel |
string |
templated |
boolean |
title |
string |
type |
string |
3.5. LocationRecord
Name | Description | Schema |
---|---|---|
childUnitIds |
The childs of Unit Record |
< integer (int64) > array |
masterUnitId |
The masterUnit of Unit Record |
integer (int64) |
3.6. PageMetadata
Name | Schema |
---|---|
number |
integer (int64) |
size |
integer (int64) |
totalElements |
integer (int64) |
totalPages |
integer (int64) |
3.7. Permission
Name | Schema |
---|---|
permissionName |
string |
permissionValue |
boolean |
3.8. WasteEvent
WasteEvent Object
Name | Description | Schema |
---|---|---|
actionCommentId |
The comment thread Id for action |
integer (int64) |
actionLevel1Id |
The level 1 action taken on regard to this waste event record |
integer (int64) |
actionLevel2Id |
The level 2 action taken on regard to this waste event record |
integer (int64) |
actionLevel3Id |
The level 3 action taken on regard to this waste event record |
integer (int64) |
actionLevel4Id |
The level 4 action taken on regard to this waste event record |
integer (int64) |
amount |
Amount of waste generated during this waste event |
number (double) |
amountConversionDivisor |
Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value. |
number (double) |
associatedProductionEventId |
The Production Event id this waste event is associated to in case this is an Event based waste |
integer (int64) |
associatedProductionEventNum |
The Production Event Number this waste event is associated to in case this is an Event based waste |
string |
causeCommentId |
The comment thread Id for cause |
integer (int64) |
confirmed |
Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions) |
boolean |
entryOn |
The time when this record was inserted in PA DB |
string (date-time) |
masterUnitId |
The master unit where this waste is produced |
integer (int64) |
productId |
Product which ended up as waste |
integer (int64) |
reasonLevel1Id |
The level 1 reason what caused this waste |
integer (int64) |
reasonLevel2Id |
The level 2 reason what caused this waste |
integer (int64) |
reasonLevel3Id |
The level 3 reason what caused this waste |
integer (int64) |
reasonLevel4Id |
The level 4 reason what caused this waste |
integer (int64) |
sourceUnitId |
The exact unit Id (slave or master) where this waste is produced |
integer (int64) |
timestamp |
The time(ISO 8601) when this waste is generated |
string (date-time) |
user |
User who raised this waste event |
string |
wasteEventFaultId |
Fault associated with this waste event |
integer (int64) |
wasteEventId |
The unique ID for this Waste Event |
integer (int64) |
wasteEventTypeId |
Waste Event Type which this waste event comes under |
integer (int64) |
wasteMeasurementId |
Waste Measurement used to measure the waste amount |
integer (int64) |
3.9. WasteEventCreate
WasteEventCreate Object
Name | Description | Schema |
---|---|---|
actionCommentId |
The comment thread Id for action comment |
integer (int64) |
actionLevel1Id |
The level 1 action taken on regard to this waste event record |
integer (int64) |
actionLevel2Id |
The level 2 action taken on regard to this waste event record |
integer (int64) |
actionLevel3Id |
The level 3 action taken on regard to this waste event record |
integer (int64) |
actionLevel4Id |
The level 4 action taken on regard to this waste event record |
integer (int64) |
amount |
Amount of waste generated during this waste event |
number (double) |
associatedProductionEventId |
The Production Event id this waste event is associated to in case this is an Event based waste |
integer (int64) |
causeCommentId |
The comment thread Id for cause |
integer (int64) |
masterUnitId |
The master unit where this waste is produced |
integer (int64) |
reasonLevel1Id |
The level 1 reason what caused this waste |
integer (int64) |
reasonLevel2Id |
The level 2 reason what caused this waste |
integer (int64) |
reasonLevel3Id |
The level 3 reason what caused this waste |
integer (int64) |
reasonLevel4Id |
The level 4 reason what caused this waste |
integer (int64) |
sourceUnitId |
The exact unit Id (slave or master) where this waste is produced |
integer (int64) |
timestamp |
The time(ISO 8601) when this waste is generated |
string (date-time) |
wasteEventFaultId |
Fault associated with this waste event |
integer (int64) |
wasteEventTypeId |
Waste Event Type which this waste event comes under |
integer (int64) |
wasteMeasurementId |
Waste Measurement used to measure the waste amount |
integer (int64) |
3.10. WasteEventFaultRecord
Name | Description | Schema |
---|---|---|
eventReasonTreeDataId |
The eventReasonTreeDataId for this Waste event fault |
integer (int64) |
id |
The unique ID for this Waste event fault |
integer (int64) |
name |
The name for this Waste event fault |
string |
reasonLevel1 |
The reasonLevel1 for this Waste event fault |
integer (int64) |
reasonLevel2 |
The reasonLevel2 for this Waste event fault |
integer (int64) |
reasonLevel3 |
The reasonLevel3 for this Waste event fault |
integer (int64) |
reasonLevel4 |
The reasonLevel4 for this Waste event fault |
integer (int64) |
sourceUnitId |
The sourceUnitId for this Waste event fault |
integer (int64) |
3.11. WasteEventPage
Name | Schema |
---|---|
content |
< WasteEventTest > array |
links |
< Link > array |
page |
3.12. WasteEventTest
Name | Description | Schema |
---|---|---|
actionCommentId |
The comment thread Id for action |
integer (int64) |
actionLevel1Id |
The level 1 action taken on regard to this waste event record |
integer (int64) |
actionLevel2Id |
The level 2 action taken on regard to this waste event record |
integer (int64) |
actionLevel3Id |
The level 3 action taken on regard to this waste event record |
integer (int64) |
actionLevel4Id |
The level 4 action taken on regard to this waste event record |
integer (int64) |
amount |
Amount of waste generated during this waste event |
number (double) |
amountConversionDivisor |
Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value. |
number (double) |
associatedProductionEventId |
The Production Event id this waste event is associated to in case this is an Event based waste |
integer (int64) |
associatedProductionEventNum |
The Production Event Number this waste event is associated to in case this is an Event based waste |
string |
causeCommentId |
The comment thread Id for cause |
integer (int64) |
confirmed |
Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions) |
boolean |
entryOn |
The time when this record was inserted in PA DB |
string (date-time) |
links |
< Link > array |
|
masterUnitId |
The master unit where this waste is produced |
integer (int64) |
permissions |
< Permission > array |
|
productId |
Product which ended up as waste |
integer (int64) |
reasonLevel1Id |
The level 1 reason what caused this waste |
integer (int64) |
reasonLevel2Id |
The level 2 reason what caused this waste |
integer (int64) |
reasonLevel3Id |
The level 3 reason what caused this waste |
integer (int64) |
reasonLevel4Id |
The level 4 reason what caused this waste |
integer (int64) |
sourceUnitId |
The exact unit Id (slave or master) where this waste is produced |
integer (int64) |
timestamp |
The time(ISO 8601) when this waste is generated |
string (date-time) |
user |
User who raised this waste event |
string |
wasteEventFaultId |
Fault associated with this waste event |
integer (int64) |
wasteEventId |
The unique ID for this Waste Event |
integer (int64) |
wasteEventTypeId |
Waste Event Type which this waste event comes under |
integer (int64) |
wasteMeasurementId |
Waste Measurement used to measure the waste amount |
integer (int64) |
3.13. WasteEventTypeRecord
Name | Description | Schema |
---|---|---|
id |
The unique ID for this Waste Event Type |
integer (int64) |
name |
The name for this Waste Event |
string |
readOnly |
If this event type read only or not |
boolean |
3.14. WasteEventUpdate
WasteEventUpdate Object
Name | Description | Schema |
---|---|---|
actionLevel1Id |
The level 1 action taken on regard to this waste event record |
integer (int64) |
actionLevel2Id |
The level 2 action taken on regard to this waste event record |
integer (int64) |
actionLevel3Id |
The level 3 action taken on regard to this waste event record |
integer (int64) |
actionLevel4Id |
The level 4 action taken on regard to this waste event record |
integer (int64) |
amount |
Amount of waste generated during this waste event |
number (double) |
masterUnitId |
The master unit where this waste is produced |
integer (int64) |
reasonLevel1Id |
The level 1 reason what caused this waste |
integer (int64) |
reasonLevel2Id |
The level 2 reason what caused this waste |
integer (int64) |
reasonLevel3Id |
The level 3 reason what caused this waste |
integer (int64) |
reasonLevel4Id |
The level 4 reason what caused this waste |
integer (int64) |
sourceUnitId |
The exact unit Id (slave or master) where this waste is produced |
integer (int64) |
timestamp |
The time(ISO 8601) when this waste is generated |
string (date-time) |
wasteEventFaultId |
Fault associated with this waste event |
integer (int64) |
wasteEventTypeId |
Waste Event Type which this waste event comes under |
integer (int64) |
wasteMeasurementId |
Waste Measurement used to measure the waste amount |
integer (int64) |
3.15. WasteMeasurementRecord
Name | Description | Schema |
---|---|---|
conversionFactor |
Constant used to convert waste amount |
number (double) |
conversionSpecVariableId |
Variable Id whose targetSpec(based on the product) would be used as conversion factor in case specified |
integer (int64) |
id |
The unique ID for this Waste Measurement |
integer (int64) |
masterUnitId |
Unit to which this measurement record belongs |
integer (int64) |
name |
Label of this Measurement |
string |
3.16. WasteUnitConfigData
WasteUnitConfigData Object
Name | Description | Schema |
---|---|---|
actionTreeId |
Id of action tree configured for this Units waste event |
integer (int64) |
displayPermissions |
List holding various permission values for the user on this unit for waste related actions |
< Permission > array |
masterUnitId |
The source unit id |
integer (int64) |
reasonTreeId |
Id of reason tree configured for this Units waste event |
integer (int64) |
sourceUnitId |
The master unit of this unit in case this is slave or else same as unit id |
integer (int64) |
4. Security
4.1. oauth
Type : oauth2
Flow : accessCode
Token URL : https://10.181.213.82/uaa/oauth/authorize
Token URL : https://10.181.213.82/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |