API Endpoints (V 1.16)

Diasteca

Nome Tipo Header Endpoint Parametri Ritorna
User (dettaglio utente) GET No /get/user/{name}/{password} name = nome utente login, password = password login json contenente i dettagli utente, compreso l'identificativo per le altre chiamate API
Geolocations (geolocalizza macchine) GET identifier = identificativo utente /get/geos Nessuno json array con l'ultima posizione pervenuta per ogni macchina associata ad utente
Geolocations (geolocalizza macchine) GET identifier = identificativo utente /get/geos/{serial}/{date_start}/{date_end} serial = seriale IoT macchina, date_start = data inizio (yyyy-mm-dd), date_end = data fine (yyyy-mm-dd) json array delle geolocalizzazioni macchina tra due date
Geolocations (geolocalizza macchine) POST identifier = identificativo utente /post/geos Body: elenco seriali tra apici (es. '600001','600002','600003') json array dell'ultima posizione pervenuta per ogni macchina nella lista
Activities (ricava attività commessa) GET identifier = identificativo utente /get/acts/job/{number} number = identificativo commessa json array delle attività delle macchine relative alla commessa
Activities (ricava attività commessa) POST identifier = identificativo utente /get/acts/job/v2 Body: number = identificativo commessa json array delle attività delle macchine relative alla commessa
Activities (ricava attività con commessa) GET identifier = identificativo utente /get/acts/mac/{serial}/{date_start}/{date_end} serial = seriale IoT macchina, start = data inizio (yyyy-mm-dd), end = data fine (yyyy-mm-dd) json array delle attività macchina associate ad una commessa, tra due date
Activities Report (ricava tutte le attività) GET identifier = identificativo utente /get/acts/all/mac/{serial}/{date_start}/{date_end} serial = seriale IoT macchina, start = data inizio (yyyy-mm-dd), end = data fine (yyyy-mm-dd) json array delle attività macchina tra due date
IORecording (ricava input/output commessa) GET identifier = identificativo utente /get/iorec/job/{number} number = identificativo commessa json array degli input/output delle macchine relative alla commessa
IORecording (ricava input/output commessa) POST identifier = identificativo utente /get/iorec/job/v2 Body: number = identificativo commessa json array degli input/output delle macchine relative alla commessa
IORecording (ricava input/output con commessa) GET identifier = identificativo utente /get/iorec/mac/{serial}/{date_start}/{date_end} serial = seriale IoT macchina, start = data inizio (yyyy-mm-dd), end = data fine (yyyy-mm-dd) json array degli input/output macchina con commessa, tra due date
IORecording Report (ricava report degli input/output) GET identifier = identificativo utente /get/iorec/all/mac/{serial}/{date_start}/{date_end} serial = seriale IoT macchina, start = data inizio (yyyy-mm-dd), end = data fine (yyyy-mm-dd) json array degli input/output macchina, tra due date
Machines (lista macchine utente) GET identifier = identificativo utente /get/machines Nessuno json array delle macchine associate ad utente
Machines (lista macchine commessa) GET identifier = identificativo utente /get/machines/{number} number = identificativo commessa json array delle macchine associate alla commessa
Machines POST identifier = identificativo utente /get/machines/v2 Body: number = identificativo commessa json array delle macchine associate alla commessa
Machines (associa macchine a commessa) POST identifier = identificativo utente /post/job/machines Body: json associazione macchine/commessa (1) Numero intero. negativo = errore. zero = nessun dato aggiornato. positivo = numero di record aggiornati.
Commissions (lista commesse utente) GET identifier = identificativo utente /get/jobs Nessuno json array delle commesse associate ad utente
Commissions (dettaglio commessa) GET identifier = identificativo utente /get/jobs/{number} number = identificativo commessa json dettaglio commessa
Commissions (dettaglio commessa) POST identifier = identificativo utente /get/jobs/v2 Body: number = identificativo commessa json dettaglio commessa
Commissions (aggiungi/aggiorna commessa) POST identifier = identificativo utente /post/job Body: json della commessa da aggiungere/aggiornare (2) Numero intero. negativo = errore. zero = nessun dato aggiornato. positivo = identificativo nuova commessa o numero record aggiornati.
Commissions (cancella commessa) DELETE identifier = identificativo utente /delete/job/{number} number = identificativo commessa Numero intero. negativo = errore. zero = nessun dato aggiornato. positivo = numero di record cancellati.
Commissions (cancella commessa) PUT identifier = identificativo utente /delete/job/v2 Body: number = identificativo commessa Numero intero. negativo = errore. zero = nessun dato aggiornato. positivo = numero di record cancellati.
Connection (stato macchina) GET identifier = identificativo utente /get/connstatus/{serial} serial = seriale IoT macchina stringa errore = disconnesso. 1 = connesso. 2-3 = aggiornamento firmware. 4 = scheda in blocco. 5 = lettura log.
Read Input/Output (stato in/out) GET identifier = identificativo utente /get/ioreading/{serial}/{inout} serial = seriale IoT macchina. inout = numero intero. 1 = inDigital, 2 = inAnalog, 3 = EventtCount, 4 = HourCount, 5 = outDigital json dello stato ingressi o uscite
Set Output (imposta output) GET identifier = identificativo utente /set/digoutput/{serial}/{out1}/{out2} serial = seriale IoT macchina. out1 = uscita 1 attiva (1) o disattiva (0). out2 = uscita 2 attiva (1) o disattiva (0). Ok o stringa di errore

(1) esempio json associazione macchine/commessa {"number":"Nr12345","machines":"'524322','610276','612540'"}
note: number è il numero alfanumerico commessa, machines è la lista matricole da associare alla commessa. lista vuota "''" dissocia tutte le macchine dalla commessa.

(2) esempio json aggiunta/aggiornamento commessa
{ "idjob": 20, "isopen": 1, "number": "Nr12345", "customer": "rossi snc", "descr": "descrizione commessa", "date_opened": "2021-07-23", "date_closed": null }
note:
idjob deve essere 0 per aggiunta, > 0 per modifica.
isopen deve essere 1 per commessa aperta, 0 per commessa chiusa.
la data di apertura deve essere specificata all'apertura della commessa, quella di chiusura, alla chiusura della commessa.
tutte le date devono essere nel formato yyyy-mm-dd.