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
optional

master Unit id to get locations

integer (int64)

Responses
HTTP Code Description Schema

200

OK

LocationRecord

401

Unauthorized

HttpErrorResponse

404

Record Not Found

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

oauth

default

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
optional

sourceUnitId to get WasteFault Details

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< WasteEventFaultRecord > array

401

Unauthorized

HttpErrorResponse

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

2.2.2. Get Waste Fault by id

GET /v1/wasteEventFaults/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

200

OK

WasteEventFaultRecord

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

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
optional

wasteEventTypeId to get WasteEventType Details

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< WasteEventTypeRecord > array

401

Unauthorized

HttpErrorResponse

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

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
required

wasteEventCreateRequest

WasteEventCreate

Responses
HTTP Code Description Schema

201

Created

ExtendedWasteEvent

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

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

Security
Type Name Scopes

oauth2

oauth

default

2.4.2. Gets the waste events generated or created in PA

GET /v1/wasteEvents
Parameters
Type Name Description Schema Default

Query

associatedProductionEventId
optional

To filter waste events for a Production Event

integer (int64)

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

includeProductionEventBased
optional

Whether to include production event based waste events. By default would include

boolean

"true"

Query

includeTimeBased
optional

Whether to include time based waste events. By default would include

boolean

"true"

Query

pageNumber
optional

Page number to return, Zero based. Default to 0

integer (int64)

0

Query

pageSize
optional

Number of resources to return per page Default to 20

integer (int64)

20

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, prevDay, currentWeek, prevWeek, nextWeek, nextDay, custom, currentShift, previousShift, nextShift)

Query

unitIds
required

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

WasteEventPage

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

Security
Type Name Scopes

oauth2

oauth

default

2.4.3. Get permissions

GET /v1/wasteEvents/permissions/{unitId}
Parameters
Type Name Description Schema

Path

unitId
required

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

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

2.4.4. Get waste event

GET /v1/wasteEvents/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

200

OK

ExtendedWasteEvent

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

2.4.5. Update waste event record

PUT /v1/wasteEvents/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Body

wasteEventUpdate
required

wasteEventUpdate

WasteEventUpdate

Responses
HTTP Code Description Schema

201

Created

ExtendedWasteEvent

400

Invalid data supplied. See message for details.

No Content

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

2.4.6. Delete waste event by Id

DELETE /v1/wasteEvents/{id}
Parameters
Type Name Description Schema

Path

id
required

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

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Security
Type Name Scopes

oauth2

oauth

default

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
required

wasteId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< WasteEvent > array

401

Unauthorized

HttpErrorResponse

403

Forbidden

HttpErrorResponse

404

Not Found

HttpErrorResponse

503

Service Unavailable

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

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
optional

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

Security
Type Name Scopes

oauth2

oauth

default

2.5.2. Get Waste Measurement by id

GET /v1/wasteMeasurements/{id}
Parameters
Type Name Description Schema

Path

id
required

id to get Waste Measurement Details

integer (int64)

Responses
HTTP Code Description Schema

200

OK

WasteMeasurementRecord

Produces
  • application/json

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

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
optional

sourceUnitIds

< integer (int64) > array(multi)

Responses
HTTP Code Description Schema

200

ok

HttpErrorResponse

Produces
  • application/json

  • application/vnd.ge.mes.v1.full+json

Security
Type Name Scopes

oauth2

oauth

default

3. Definitions

3.1. Error

Name Schema

code
optional

string

details
optional

object

3.2. ExtendedWasteEvent

Name Description Schema

actionCommentId
optional

The comment thread Id for action

integer (int64)

actionLevel1Id
optional

The level 1 action taken on regard to this waste event record

integer (int64)

actionLevel2Id
optional

The level 2 action taken on regard to this waste event record

integer (int64)

actionLevel3Id
optional

The level 3 action taken on regard to this waste event record

integer (int64)

actionLevel4Id
optional

The level 4 action taken on regard to this waste event record

integer (int64)

amount
optional

Amount of waste generated during this waste event

number (double)

amountConversionDivisor
optional

Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value.

number (double)

associatedProductionEventId
optional

The Production Event id this waste event is associated to in case this is an Event based waste

integer (int64)

associatedProductionEventNum
optional

The Production Event Number this waste event is associated to in case this is an Event based waste

string

causeCommentId
optional

The comment thread Id for cause

integer (int64)

confirmed
optional

Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions)
Example : false

boolean

entryOn
optional

The time when this record was inserted in PA DB

string (date-time)

links
optional

< Link > array

masterUnitId
optional

The master unit where this waste is produced

integer (int64)

permissions
optional

< Permission > array

productId
optional

Product which ended up as waste

integer (int64)

reasonLevel1Id
optional

The level 1 reason what caused this waste

integer (int64)

reasonLevel2Id
optional

The level 2 reason what caused this waste

integer (int64)

reasonLevel3Id
optional

The level 3 reason what caused this waste

integer (int64)

reasonLevel4Id
optional

The level 4 reason what caused this waste

integer (int64)

sourceUnitId
optional

The exact unit Id (slave or master) where this waste is produced

integer (int64)

timestamp
optional

The time(ISO 8601) when this waste is generated

string (date-time)

user
optional

User who raised this waste event

string

wasteEventFaultId
optional

Fault associated with this waste event

integer (int64)

wasteEventId
optional

The unique ID for this Waste Event

integer (int64)

wasteEventTypeId
optional

Waste Event Type which this waste event comes under

integer (int64)

wasteMeasurementId
optional

Waste Measurement used to measure the waste amount

integer (int64)

3.3. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

Name Schema

deprecation
optional

string

href
optional

string

hreflang
optional

string

media
optional

string

rel
optional

string

templated
optional

boolean

title
optional

string

type
optional

string

3.5. LocationRecord

Name Description Schema

childUnitIds
optional

The childs of Unit Record

< integer (int64) > array

masterUnitId
optional

The masterUnit of Unit Record

integer (int64)

3.6. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.7. Permission

Name Schema

permissionName
optional

string

permissionValue
optional

boolean

3.8. WasteEvent

WasteEvent Object

Name Description Schema

actionCommentId
optional

The comment thread Id for action

integer (int64)

actionLevel1Id
optional

The level 1 action taken on regard to this waste event record

integer (int64)

actionLevel2Id
optional

The level 2 action taken on regard to this waste event record

integer (int64)

actionLevel3Id
optional

The level 3 action taken on regard to this waste event record

integer (int64)

actionLevel4Id
optional

The level 4 action taken on regard to this waste event record

integer (int64)

amount
optional

Amount of waste generated during this waste event

number (double)

amountConversionDivisor
optional

Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value.

number (double)

associatedProductionEventId
optional

The Production Event id this waste event is associated to in case this is an Event based waste

integer (int64)

associatedProductionEventNum
optional

The Production Event Number this waste event is associated to in case this is an Event based waste

string

causeCommentId
optional

The comment thread Id for cause

integer (int64)

confirmed
optional

Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions)
Example : false

boolean

entryOn
optional

The time when this record was inserted in PA DB

string (date-time)

masterUnitId
optional

The master unit where this waste is produced

integer (int64)

productId
optional

Product which ended up as waste

integer (int64)

reasonLevel1Id
optional

The level 1 reason what caused this waste

integer (int64)

reasonLevel2Id
optional

The level 2 reason what caused this waste

integer (int64)

reasonLevel3Id
optional

The level 3 reason what caused this waste

integer (int64)

reasonLevel4Id
optional

The level 4 reason what caused this waste

integer (int64)

sourceUnitId
optional

The exact unit Id (slave or master) where this waste is produced

integer (int64)

timestamp
optional

The time(ISO 8601) when this waste is generated

string (date-time)

user
optional

User who raised this waste event

string

wasteEventFaultId
optional

Fault associated with this waste event

integer (int64)

wasteEventId
optional

The unique ID for this Waste Event

integer (int64)

wasteEventTypeId
optional

Waste Event Type which this waste event comes under

integer (int64)

wasteMeasurementId
optional

Waste Measurement used to measure the waste amount

integer (int64)

3.9. WasteEventCreate

WasteEventCreate Object

Name Description Schema

actionCommentId
optional

The comment thread Id for action comment

integer (int64)

actionLevel1Id
optional

The level 1 action taken on regard to this waste event record

integer (int64)

actionLevel2Id
optional

The level 2 action taken on regard to this waste event record

integer (int64)

actionLevel3Id
optional

The level 3 action taken on regard to this waste event record

integer (int64)

actionLevel4Id
optional

The level 4 action taken on regard to this waste event record

integer (int64)

amount
optional

Amount of waste generated during this waste event

number (double)

associatedProductionEventId
optional

The Production Event id this waste event is associated to in case this is an Event based waste

integer (int64)

causeCommentId
optional

The comment thread Id for cause

integer (int64)

masterUnitId
optional

The master unit where this waste is produced

integer (int64)

reasonLevel1Id
optional

The level 1 reason what caused this waste

integer (int64)

reasonLevel2Id
optional

The level 2 reason what caused this waste

integer (int64)

reasonLevel3Id
optional

The level 3 reason what caused this waste

integer (int64)

reasonLevel4Id
optional

The level 4 reason what caused this waste

integer (int64)

sourceUnitId
optional

The exact unit Id (slave or master) where this waste is produced

integer (int64)

timestamp
optional

The time(ISO 8601) when this waste is generated

string (date-time)

wasteEventFaultId
optional

Fault associated with this waste event

integer (int64)

wasteEventTypeId
optional

Waste Event Type which this waste event comes under

integer (int64)

wasteMeasurementId
optional

Waste Measurement used to measure the waste amount

integer (int64)

3.10. WasteEventFaultRecord

Name Description Schema

eventReasonTreeDataId
optional

The eventReasonTreeDataId for this Waste event fault

integer (int64)

id
optional

The unique ID for this Waste event fault

integer (int64)

name
optional

The name for this Waste event fault

string

reasonLevel1
optional

The reasonLevel1 for this Waste event fault

integer (int64)

reasonLevel2
optional

The reasonLevel2 for this Waste event fault

integer (int64)

reasonLevel3
optional

The reasonLevel3 for this Waste event fault

integer (int64)

reasonLevel4
optional

The reasonLevel4 for this Waste event fault

integer (int64)

sourceUnitId
optional

The sourceUnitId for this Waste event fault

integer (int64)

3.11. WasteEventPage

Name Schema

content
optional

< WasteEventTest > array

links
optional

< Link > array

page
optional

PageMetadata

3.12. WasteEventTest

Name Description Schema

actionCommentId
optional

The comment thread Id for action

integer (int64)

actionLevel1Id
optional

The level 1 action taken on regard to this waste event record

integer (int64)

actionLevel2Id
optional

The level 2 action taken on regard to this waste event record

integer (int64)

actionLevel3Id
optional

The level 3 action taken on regard to this waste event record

integer (int64)

actionLevel4Id
optional

The level 4 action taken on regard to this waste event record

integer (int64)

amount
optional

Amount of waste generated during this waste event

number (double)

amountConversionDivisor
optional

Amount conversion factor. For displaying with wasteMeasurement label divide the amount with this value.

number (double)

associatedProductionEventId
optional

The Production Event id this waste event is associated to in case this is an Event based waste

integer (int64)

associatedProductionEventNum
optional

The Production Event Number this waste event is associated to in case this is an Event based waste

string

causeCommentId
optional

The comment thread Id for cause

integer (int64)

confirmed
optional

Based on whether reasons are filled or not depends on display options (can set for reasons only or for reasons and actions)
Example : false

boolean

entryOn
optional

The time when this record was inserted in PA DB

string (date-time)

links
optional

< Link > array

masterUnitId
optional

The master unit where this waste is produced

integer (int64)

permissions
optional

< Permission > array

productId
optional

Product which ended up as waste

integer (int64)

reasonLevel1Id
optional

The level 1 reason what caused this waste

integer (int64)

reasonLevel2Id
optional

The level 2 reason what caused this waste

integer (int64)

reasonLevel3Id
optional

The level 3 reason what caused this waste

integer (int64)

reasonLevel4Id
optional

The level 4 reason what caused this waste

integer (int64)

sourceUnitId
optional

The exact unit Id (slave or master) where this waste is produced

integer (int64)

timestamp
optional

The time(ISO 8601) when this waste is generated

string (date-time)

user
optional

User who raised this waste event

string

wasteEventFaultId
optional

Fault associated with this waste event

integer (int64)

wasteEventId
optional

The unique ID for this Waste Event

integer (int64)

wasteEventTypeId
optional

Waste Event Type which this waste event comes under

integer (int64)

wasteMeasurementId
optional

Waste Measurement used to measure the waste amount

integer (int64)

3.13. WasteEventTypeRecord

Name Description Schema

id
optional

The unique ID for this Waste Event Type

integer (int64)

name
optional

The name for this Waste Event

string

readOnly
optional

If this event type read only or not
Example : false

boolean

3.14. WasteEventUpdate

WasteEventUpdate Object

Name Description Schema

actionLevel1Id
optional

The level 1 action taken on regard to this waste event record

integer (int64)

actionLevel2Id
optional

The level 2 action taken on regard to this waste event record

integer (int64)

actionLevel3Id
optional

The level 3 action taken on regard to this waste event record

integer (int64)

actionLevel4Id
optional

The level 4 action taken on regard to this waste event record

integer (int64)

amount
optional

Amount of waste generated during this waste event

number (double)

masterUnitId
optional

The master unit where this waste is produced

integer (int64)

reasonLevel1Id
optional

The level 1 reason what caused this waste

integer (int64)

reasonLevel2Id
optional

The level 2 reason what caused this waste

integer (int64)

reasonLevel3Id
optional

The level 3 reason what caused this waste

integer (int64)

reasonLevel4Id
optional

The level 4 reason what caused this waste

integer (int64)

sourceUnitId
optional

The exact unit Id (slave or master) where this waste is produced

integer (int64)

timestamp
optional

The time(ISO 8601) when this waste is generated

string (date-time)

wasteEventFaultId
optional

Fault associated with this waste event

integer (int64)

wasteEventTypeId
optional

Waste Event Type which this waste event comes under

integer (int64)

wasteMeasurementId
optional

Waste Measurement used to measure the waste amount

integer (int64)

3.15. WasteMeasurementRecord

Name Description Schema

conversionFactor
optional

Constant used to convert waste amount

number (double)

conversionSpecVariableId
optional

Variable Id whose targetSpec(based on the product) would be used as conversion factor in case specified

integer (int64)

id
optional

The unique ID for this Waste Measurement

integer (int64)

masterUnitId
optional

Unit to which this measurement record belongs

integer (int64)

name
optional

Label of this Measurement

string

3.16. WasteUnitConfigData

WasteUnitConfigData Object

Name Description Schema

actionTreeId
optional

Id of action tree configured for this Units waste event

integer (int64)

displayPermissions
optional

List holding various permission values for the user on this unit for waste related actions

< Permission > array

masterUnitId
optional

The source unit id

integer (int64)

reasonTreeId
optional

Id of reason tree configured for this Units waste event

integer (int64)

sourceUnitId
optional

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.