Tree gets the schema of areas and processes.

GET /tree

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • version (1/2): the version of the request.
    • device: id of the device from wich the request is made.
    • showoee (0/1): shows the OEE of areas and processes: oee_actual, oee_target_yellow, oee_target_green. (for version = 1)
    • showalerts (0/1): shows the notification alerts for each process: notify_pr, notify_ti. (for version = 1)
    • showdashboard (0/1): shows the first dashboard configured for each process. (for version = 1)
    • area: makes the request from the given area, if empty, gets the whole tree. (for version = 2)
    • period: indicates the perdiod to show color and alerts from the period list; for more information about period list go to periods. (for version = 2)
    • type: indicates the ratio type to show; the available ratios list is: 0 - OEE, 1 - Operative OEE, 2 - OCE, 3 - OPCE. (for version = 2)
    • recursive: indicates if the request gets the sub-areas and processes recursively or gets only the first level from the indcated area or from root if area is empty. (for version = 2)

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the schema of areas and processes on success or the link to the request help on error.
    • message: "Success" or a descriptive information of the error in any other case.

Example (version = 1):

Re

quest:

{"type":"get",

"url":"tree",

"data":"company=testco&session=neQXoKWYLALJ1yVjr5d2ANOhZrwp52p5qeyM7WdzAi96rJ5QKmGHsIyF5tzV&version=1"}


Reponse (success):

{

 "status": "0",

 "data": {

   "areas": [

     {

       "id": "100",

       "desc": "NAVE1",

       "processes": [

         {

           "id": "101",

           "desc": "RS101",

           "type": "0",

           "shifts": []

         },

         {

           "id": "102",

           "desc": "RS102",

           "type": "0",

           "shifts": []

         },

         {

           "id": "103",

           "desc": "RS103",

           "type": "0",

           "shifts": []

         }

       ]

     },

     {

       "id": "200",

       "desc": "NAVE2",

       "processes": [

         {

           "id": "201",

           "desc": "RS201",

           "type": "0",

           "shifts": []

         },

         {

           "id": "202",

           "desc": "RS202",

           "type": "0",

           "shifts": []

         }

       ]

     }

   ]

 },

 "message": "Success"

}


Reponse (error):

{"status":"1000",

"data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Tree.html'>for additional information follow this link<\/a>",

"message":"Some parameters are missing"}

Example (version = 2):

Request:

{"type":"get",

"url":"tree",

"data":"version=2&company=7362919493&session=Bm79Sa1HHxGG3N9MrOUogBWkCf5Tc1B6sK1ebwaz2xyqGdUpQF2WQeSZgvPa&device=INIT&area=&period=1&type=0&recursive=1"}


Reponse (success):

{

 "status": "0",

 "data": {

   "parentids": [

     "|",

     "||7100",

     "||7100"

   ],

   "childids": [

     "7100",

     "7101",

     "7102"

   ],

   "childdescs": [

     "BOLSAS",

     "MACH 7101",

     "MACH 7102"

   ],

   "childtypes": [

     0,

     1,

     1

   ],

   "areas": [

     {

       "id": "7100",

       "description": "BOLSAS",

       "type": 0,

       "elements": "7101,7102",

       "formula": "\"7101\"+\"7102\"",

       "y0": 0,

       "g0": 0,

       "y1": 0,

       "g1": 0,

       "y2": 0,

       "g2": 0,

       "y3": 0,

       "g3": 0,

       "y4": 0,

       "g4": 0,

       "y5": 0,

       "g5": 0,

       "y6": 0,

       "g6": 0,

       "y7": 0,

       "g7": 0,

       "background": "",

       "width": 0,

       "height": 0,

       "wbs": "",

       "driverip": "",

       "scheduled": 1,

       "color": 4517779,

       "label": "7100-BOLSAS:rn0%>=0%",

       "oee": {

         "Id": "7100",

         "OEE0TT": 49492,

         "OEE1TT": 7200,

         "OEE2TT": 28800,

         "OEE3TT": 172800,

         "OEE4TT": 0,

         "OEE5TT": 0,

         "OEE0A": 0,

         "OEE1A": 0,

         "OEE2A": 0,

         "OEE3A": 0.1335,

         "OEE4A": 0,

         "OEE5A": 0,

         "OEE0O": 0,

         "OEE1O": 0,

         "OEE2O": 0,

         "OEE3O": 0.143,

         "OEE4O": 0,

         "OEE5O": 0,

         "OEE0P": 1,

         "OEE1P": 1,

         "OEE2P": 1,

         "OEE3P": 0.2062,

         "OEE4P": 0,

         "OEE5P": 0,

         "OEE0Q": 1,

         "OEE1Q": 1,

         "OEE2Q": 1,

         "OEE3Q": 0.9959,

         "OEE4Q": 0,

         "OEE5Q": 0,

         "OEELastUpdate": "20210610125222"

       },

       "state": {

         "Id": "7100",

         "Video": "",

         "Since": "",

         "Sch_Col": 7,

         "Pro_Col": 0,

         "Ti0_Col": 7,

         "Ti1_Col": 7,

         "Ti2_Col": 6,

         "Co0_Col": 0,

         "Co1_Col": 0,

         "Co2_Col": 0,

         "Aut_Col": 0,

         "SPC0_Col": 0,

         "SPC1_Col": 0

       },

       "graphic": {

         "": "[]"

       }

     }

   ],

   "processes": [

     {

       "order": 1,

       "id": "7101",

       "desc": "MACH 7101",

       "calculation": "BOLSAS",

       "cycleot": 0,

       "cyclet": 15,

       "maxcyclet": 15,

       "cycleq": 0.07575,

       "npcauto": 0,

       "unit": "MI",

       "minopers": 0,

       "opers": 1,

       "y0": 50,

       "g0": 60,

       "y1": 80,

       "g1": 90,

       "y2": 90,

       "g2": 95,

       "y3": 60,

       "g3": 70,

       "y4": 10,

       "g4": 5,

       "y5": 240,

       "g5": 120,

       "y6": 60,

       "g6": 30,

       "y7": 50,

       "g7": 50,

       "trace": 0,

       "next_processes": "",

       "resps": "9999",

       "stshort": 120,

       "prshort": 60,

       "microstop": "MIC",

       "url": "",

       "lockrec": 480,

       "man": 13,

       "genpstart": 0,

       "interign": 0,

       "limprodtosche": 1,

       "allowconf": 0,

       "type": 0,

       "requirenotify": 0,

       "wbs": "",

       "notifyratios": 0,

       "represent": 0,

       "excessordefect": 0,

       "schedulefields": 0,

       "img": "",

       "imgurl": "http:///edinnm2/img/7362919493/Mach_7101_",

       "operationtime": 216000,

       "color": 5066239,

       "label": "7101-MACH 7101rnANONIMO (0,150)rn10/6 18:20 -> 10/10 22:00rn0%<51%",

       "tooltip": "",

       "oee": {

         "Id": "7101",

         "OEE0TT": 24742,

         "OEE1TT": 3600,

         "OEE2TT": 14400,

         "OEE3TT": 86400,

         "OEE4TT": 0,

         "OEE5TT": 0,

         "OEE0A": 0,

         "OEE1A": 0,

         "OEE2A": 0,

         "OEE3A": 0.0531,

         "OEE4A": 0,

         "OEE5A": 0,

         "OEE0O": 0,

         "OEE1O": 0,

         "OEE2O": 0,

         "OEE3O": 0.0612,

         "OEE4O": 0,

         "OEE5O": 0,

         "OEE0P": 1,

         "OEE1P": 1,

         "OEE2P": 1,

         "OEE3P": 0.3195,

         "OEE4P": 0,

         "OEE5P": 0,

         "OEE0Q": 1,

         "OEE1Q": 1,

         "OEE2Q": 1,

         "OEE3Q": 0.9918,

         "OEE4Q": 0,

         "OEE5Q": 0,

         "OEELastUpdate": "20210610125222"

       },

       "state": {

         "Id": "7101",

         "NextPiece": "",

         "Limit": "",

         "Id_TUnext": "",

         "Id_TUlimit": "",

         "Id_TUSince": "20210610182029",

         "Id_TU": "6105",

         "PNSince": "20210610182029",

         "PN": "21000764-10",

         "Id_ProdSince": "20210610182029",

         "Id_Prod": "BA1156535200VM",

         "Sch_Col": 7,

         "Pro_Col": 0,

         "Ti0_Col": 7,

         "Ti1_Col": 7,

         "Ti2_Col": 6,

         "Co0_Col": 0,

         "Co1_Col": 0,

         "Co2_Col": 0,

         "Aut_Col": 0,

         "SPC0_Col": 0,

         "SPC1_Col": 0,

         "GQT_Col": 0,

         "QuickUpd": 0,

         "QUDateTime": "",

         "CycleT": 82,

         "CycleQ": 1,

         "SPCReq": "",

         "LastSentPR": "",

         "LastResultId": "20210610182007ABRINIT",

         "LastResultWhen": "20210610182029",

         "LastResultPaused": 2,

         "LastResultId_Paused": "",

         "LastResultModified": "",

         "TUTypeCurrent": 3,

         "AvgCycleT": 15,

         "AvgCycleQ": 0.0000192731

       }

     },

     {

       "order": 2,

       "id": "7102",

       "desc": "MACH 7102",

       "calculation": "BOLSAS",

       "cycleot": 0,

       "cyclet": 15,

       "maxcyclet": 15,

       "cycleq": 0.07575,

       "npcauto": 0,

       "unit": "MI",

       "minopers": 0,

       "opers": 1,

       "y0": 50,

       "g0": 60,

       "y1": 80,

       "g1": 90,

       "y2": 90,

       "g2": 95,

       "y3": 60,

       "g3": 70,

       "y4": 10,

       "g4": 5,

       "y5": 240,

       "g5": 120,

       "y6": 60,

       "g6": 30,

       "y7": 50,

       "g7": 50,

       "trace": 0,

       "next_processes": "",

       "resps": "9999",

       "stshort": 120,

       "prshort": 60,

       "microstop": "MIC",

       "url": "",

       "lockrec": 480,

       "man": 13,

       "genpstart": 0,

       "interign": 0,

       "limprodtosche": 1,

       "allowconf": 0,

       "type": 0,

       "requirenotify": 0,

       "wbs": "",

       "notifyratios": 0,

       "represent": 0,

       "excessordefect": 0,

       "schedulefields": 0,

       "img": "",

       "imgurl": "http:///edinnm2/img/7362919493/Mach_7102_",

       "operationtime": 216000,

       "color": 5066239,

       "label": "7102-MACH 7102rnCOFB (507,091)rn26/5 14:34 -> 31/12 22:00rn0%<51%",

       "tooltip": "",

       "oee": {

         "Id": "7102",

         "OEE0TT": 24750,

         "OEE1TT": 3600,

         "OEE2TT": 14400,

         "OEE3TT": 86400,

         "OEE4TT": 0,

         "OEE5TT": 0,

         "OEE0A": 0,

         "OEE1A": 0,

         "OEE2A": 0,

         "OEE3A": 0.2139,

         "OEE4A": 0,

         "OEE5A": 0,

         "OEE0O": 0,

         "OEE1O": 0,

         "OEE2O": 0,

         "OEE3O": 0.2139,

         "OEE4O": 0,

         "OEE5O": 0,

         "OEE0P": 1,

         "OEE1P": 1,

         "OEE2P": 1,

         "OEE3P": 0.0928,

         "OEE4P": 0,

         "OEE5P": 0,

         "OEE0Q": 1,

         "OEE1Q": 1,

         "OEE2Q": 1,

         "OEE3Q": 1,

         "OEE4Q": 0,

         "OEE5Q": 0,

         "OEELastUpdate": "20210610125230"

       },

       "state": {

         "Id": "7102",

         "NextPiece": "",

         "Limit": "",

         "Id_TUnext": "",

         "Id_TUlimit": "",

         "Id_TUSince": "20210610060000",

         "Id_TU": "FAI",

         "PNSince": "20210526143425",

         "PN": "20001652-10",

         "Id_ProdSince": "20210526143425",

         "Id_Prod": "BB1828611101/29372",

         "Sch_Col": 7,

         "Pro_Col": 0,

         "Ti0_Col": 7,

         "Ti1_Col": 7,

         "Ti2_Col": 6,

         "Co0_Col": 0,

         "Co1_Col": 0,

         "Co2_Col": 0,

         "Aut_Col": 0,

         "SPC0_Col": 0,

         "SPC1_Col": 0,

         "GQT_Col": 0,

         "QuickUpd": 0,

         "QUDateTime": "",

         "CycleT": 324.518,

         "CycleQ": 1,

         "SPCReq": "",

         "LastSentPR": "",

         "LastResultId": "20210609180532AGQCENTRAL",

         "LastResultWhen": "20210609180531",

         "LastResultPaused": 0,

         "LastResultId_Paused": "",

         "LastResultModified": "",

         "TUTypeCurrent": 3,

         "AvgCycleT": 15,

         "AvgCycleQ": 0.0000165072

       }

     }

   ]

 },

 "message": "Success"

}

Reponse (error):

{"status":"1000",

"data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Tree.html'>for additional information follow this link<\/a>",

"message":"Some parameters are missing"}