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:

Content-Type: application/json

Request: /areas/L1/status?company=demo01&session=4rnTZHKyVnySZp036myysXYQc7HroVo8cbPvnXQKXsNEbg6OKE0fdcL5KLQC&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:

Content-Type: application/json

Request: /areas/L1/status?company=demo01&session=4rnTZHKyVnySZp036myysXYQc7HroVo8cbPvnXQKXsNEbg6OKE0fdcL5KLQC&actual=1

Reponse (success):

{

 "status": "0",

 "data": {

     "production"

 },

 "message": "Success"

}