Configuration
This section handles the areas configuration.
GET /areas
This method returns the list of areas visibles for the user.
Request parameters:
- company [mandatory]: The company name or id.
- session [mandatory]: The Id of the active session.
Response:
- status: Returns "0" on success, and an error code in any other case.
- data: Returns the list of areas and its attributes.
- message: "Success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"get", "url":"areas", "data":"company=testco&session=08McAsZm2yvxupxXTwy5oGin9LekeT1KOPpfEEgZKAWKncP9dKbdPRg2nmzW"} Reponse (success): {"status": "0", "data": [{"id": "ALL", "description": "ALL", "type": "0", "elements": "A0L1,PROCT1,A0L2,B0L3,B0L4", "formula": ""A0L1"+"A0L2"+"B0L3"+"B0L4"", "y0": "82.3", "g0": "93.62", "y1": "100", "g1": "100", "y2": "99.9", "g2": "99.9", "y3": "0", "g3": "0", "y4": "0", "g4": "0", "y5": "0", "g5": "0", "y6": "0", "g6": "0", "y7": "0", "g7": "0", "background": "factory3.jpg", "width": "1700", "height": "1133", "wbs": "W1.1", "driverip": "8080", "scheduled": "1", "color": null, "label": null, "oee": null, "state": null, "graphic": null}], "message": "Success"} Reponse (error): {"status": "1001", "data": "<a href='http://mayen19/edinnM2/help/en/API_Areas_Config.html'>for additional information follow this link</a>", "message": "Company name not found"} |
GET /areas/{id}/processes
This method returns the list of processes belonging to the indicate area and visibles for the user.
Request attribute:
- id [mandatory]: the Id of the status.
Request parameters:
- company [mandatory]: the company name or id.
- session [mandatory]: the Id of the active session.
Response:
- status: Returns "0" on success, and an error code in any other case.
- data: Returns the list of processes and its descriptions.
- message: "Success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"get", "url":"areas", "data":"company=testco&session=08McAsZm2yvxupxXTwy5oGin9LekeT1KOPpfEEgZKAWKncP9dKbdPRg2nmzW"} Reponse (success): {"status": "0", "data": [ {"process": "7101","description": "Línea 1"}, {"process": "7102","description": "Línea 2"}], "message": "Success"} Reponse (error): {"status": "1001", "data": "<a href='http://mayen19/edinnM2/help/en/API_Areas_Config.html'>for additional information follow this link</a>", "message": "Company name not found"} |
POST /areas
This method creates an area. The user must have the administrator role.
Request parameters:
- company [mandatory]: The company name or id.
- session [mandatory]: The Id of the active session.
- id [mandatory]: Area identifier.
- desc: name of the area.
- elements: list of the processes thay are contained in the area.
- alg: algorithm that will be used to calculate the OEE of the area.
- y0: yellow objective for availability.
- g0: green objective for availability.
- y1: yellow objective for speed.
- g1: green objective for speed.
- y2: yellow objective for quality.
- g2: green objective for quality
- y3: yellow objective for productive availability.
- g3: green objective for productive availability.
- y4: yellow objective for the quantity of MTBF.
- g4: green objective for the quantity of MTBF.
- y5: yellow objective for the MTBF.
- g5: green objective for the MTBF.
- y6: yellow objective for the MTTR.
- g6: green objective for the MTTR.
- y7: yellow objective for the OCE.
- g7: green objective for the OCE.
- img: image of the area.
- imgwidth: image width.
- imgheight: image height.
- etype: type of the area.
- recourses: list of recourses that can see the area.
- devices: list of thevices that can see the area.
- wbs: the work breakdown structure of the area.
- driverIP:the driver IP for the area
- scheduled: whether the area is scheduled or not
Response:
- status: Returns "0" on success, and an error code in any other case.
- data: Returns the list of processes and its descriptions.
- message: "Success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"post", "url":"areas", "data":"company=testco","session": "LebEWTNf8GEhxfQeeGbBmVUlxmUIDLVdEoeVYrnWNzkdRXKxmgCNc92wnSjA","id": "L1","desc":"Test area","devices":"ACA2A","recourses":"ADMIN","wbs":"W1.1"} Reponse (success): {"status":"0", "data":"L1", "message":"Success"} Reponse (error): {"status":"1007", "data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Sessions.html'>for additional information follow this link<\/a>", "message":"Session not stablished"} |
DELETE /areas/{id}
This method deletes a results. The user must have the administrator role.
Request attribute:
- id [mandatory]: the Id of the status.
Request parameters:
- company [mandatory]: the company name or id.
- session [mandatory]: the Id of the active session.
Response:
- status: returns "0" on success, and an error code in any other case.
- data: "success" on success, and empty in case of error.
- message: "success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"delete", "url":"areas/L1", "data":"company=testco","session": "LebEWTNf8GEhxfQeeGbBmVUlxmUIDLVdEoeVYrnWNzkdRXKxmgCNc92wnSjA"} Reponse (success): {"status":"0", "data":"true", "message":"Success"} Reponse (error): {"status":"1007", "data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Sessions.html'>for additional information follow this link<\/a>", "message":"Session not stablished"} |