Operation
This section handles the areas operation.
GET /areas/{id}/status
Returns the actual status or the list of statuses of an area.
Request attribute:
- id [mandatory]: area identifier.
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 actual status or the list of statuses of the current area.
- message: "success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"get", "url":"areas/L1/status", "data":"company=demo01&session=08McAsZm2yvxupxXTwy5oGin9LekeT1KOPpfEEgZKAWKncP9dKbdPRg2nmzW&actual=1"} Response (success): { "status":"0"; "data": { "production" }, "message": "Success" } |
PUT /areas/{id}/status
To change the actual status of an area
Request attribute:
- id [mandatory]: area identifier.
Request parameters:
- company [mandatory]: the company name or id.
- session [mandatory]: the id of the active session.
- status: the new status.
Response:
- status: returns "0" on success, and an error code in any other case.
- data: null.
- message: "success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"put", "url":"areas/L1/status", "data":"company=demo01&session=08McAsZm2yvxupxXTwy5oGin9LekeT1KOPpfEEgZKAWKncP9dKbdPRg2nmzW&actual=1"} Reponse (success): { "status": "0", "data": { "production" }, "message": "Success" } |