List
The Work Centre Group – List API call reads existing Work Centre Groups from Eyelit. The data can be filtered based on the parameters passed in the body/payload of the JSON packet giving the flexibility to search for one or multiple Work Centre Groups.
Using the Work Centre Group – List API call has no impact on the data within the given Eyelit application, it is read-only.
Figure 1 shows the logic used within the Work Centre Group – List API call.
Figure 1 - Logic within WorkCentreGroup/List API Call
Data Prerequisites
There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list Work Centre Groups. If parameters are passed in through the body that return no valid results, an empty payload will be returned.
Request
Table 1 shows the method and endpoint required to make the API call to list Work Centre Groups.
Table 1 - Outbound Message Detail for Work Centre Group - List
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/WorkCentreGroup/List |
The body of the payload should follow the format below.
See Table 2 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 2 - Parameter Information for Work Centre Group - List
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | workcentregroup.id | NUMBER | No | N/A | Exact |
SUID | workcentregroup.suid | VARCHAR2(500) | No | No | Exact |
Name | workcentregroup.name | VARCHAR2(200) | No | No | Exact |
Sample Request
See below for sample use cases with examples of the JSON payload format required.
To list all Work Centre Groups:
To list Work Centre Groups where the name is equal to CNC Machines:
Response
When using the Work Centre Group – List API call, if any data has been found in Eyelit MES-M that meets the parameter values passed in the original payload, a JSON payload will be returned containing data in the following structure:
Sample Response
See below for sample use cases with examples of the JSON payload format returned.
No results were found that matched given parameters:
Multiple Work Centre Groups were found that matched given parameters:
Upsert
The Work Centre Group – Upsert API call checks if a Work Centre Type with the given ID already exists. If it does, appropriate fields are updated in the matching Work Centre in Eyelit MES-M.
If no ID is provided, then a new Work Centre Group is created.
Figure 2 shows the logic used within the Work Centre Group – Upsert API call.
Figure 2 - Logic within Work CentreGroup/Upsert API Call
Data Prerequisites
There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to upsert Work Centre Groups. If parameters are passed in through the body that return no valid results a new Work Centre group will be created, otherwise the Work Centre Group identified will be updated.
Request
Table 3 shows the method and endpoint required to make the API call to list Work Centre Groups.
Table 3 - Outbound Message Detail for Work Centre Group - Upsert
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/WorkCentreGroup/Upsert |
The body of the payload should follow the format below.
See Table 4 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 4 - Parameter Information for Work Centre Group - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | Work Centregroup.id | NUMBER | No1 | N/A | Exact |
Name | Work Centregroup.name | VARCHAR2(250 BYTE) | No | N/A | N/A |
Description | Work Centregroup.description | VARCHAR2(2000 BYTE) | No | N/A | N/A |
Note: For any fields where the match type is ‘Like’, a percent symbol should be used as a wildcard character to indicate a number of characters within the given string.
Sample Request
See below for sample use cases with examples of the JSON payload format required.
To create a new Work Centre Group.
To update name and description by ID.
Response
When using the Work Centre Group – Upsert API call, if a Work Centre Group has been Created or Updated a JSON payload will be returned containing data in the following structure:
Sample Response
See below for sample use cases with examples of the JSON payload format returned.
Delete
The Work Centre Group – Delete API call attempts to delete a Work Centre Group. A Work Centre Group can be deleted as long as there are no Work Centres currently assigned to the Work Centre Group.
Figure 3 shows the logic used within the Work Centre Group – Delete API call.
Figure 3 - Logic within Work CentreGroup/Delete API Call
Data Prerequisites
In order to delete a Work Centre Group, the Work Centre Group must exist in Eyelit MES-M.
The Work Centre Group must have no Work Centres currently assigned.
Request
Table 5 shows the method and endpoint required to make the API call to list Work Centre Groups.
Table 5 - Outbound Message Detail for Work Centre Group - Delete
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/WorkCentreGroup/List |
The body of the payload should follow the format below.
See Table 6 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 6 - Parameter Information for Work Centre Group - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | Work Centregroup.id | NUMBER | No | N/A | Exact |
Note: For any fields where the match type is ‘Like’, a percent symbol should be used as a wildcard character to indicate a number of characters within the given string. See examples in Section Error! Reference source not found. for use cases.
Sample Request
See below for sample use cases with examples of the JSON payload format required.
Delete by ID
Response
When using the Work Centre Group – Delete API call, if a Work Centre Group has been Deleted a JSON payload will be returned containing data in the following structure:
Sample Response
See below for sample use cases with examples of the JSON payload format returned.