HTI Horizon Tech Infrastructure
← Dashboard

๐Ÿ”Œ API REST

Documentazione + gestione token per integrazioni esterne (Excel / PowerBI / Business Central / script). Endpoint JSON live a /api/*. Documentazione interattiva auto-generata a /docs.

๐Ÿ”‘ Token API

โš ๏ธ Nessun token impostato โ€” le API sono libere: chiunque sulla LAN puรฒ chiamarle. Genera un token per richiedere autenticazione.

๐Ÿ“š Endpoint disponibili

Metodo Path Descrizione Auth
GET/api/infoVersione, hostname (health check)โ€”
GET/api/commesseLista commesse (filtro ?stato=IN_PRODUZIONE&limit=50)๐Ÿ”“
GET/api/commesse/<numero>Dettaglio commessa + tende๐Ÿ”“
GET/api/operatoriLista operatori (basic, no sensibili)๐Ÿ”“
POST/api/commesse/verificaVerifica esistenza/diff (PC reparto)๐Ÿ”“
POST/api/commesse/registraCrea commessa + tende (atomico)๐Ÿ”“
POST/api/commesse/aggiornaApplica modifiche commessa esistente๐Ÿ”“

๐Ÿ’ก Esempi

Curl (PowerShell):

curl http://10.10.10.57:8000/api/commesse

Excel/PowerQuery (M):

let
    Source = Json.Document(Web.Contents("http://10.10.10.57:8000/api/commesse"))
in
    Source[commesse]

Python (requests):

import requests
r = requests.get("http://10.10.10.57:8000/api/commesse")
print(r.json()["commesse"])

โ„น๏ธ Documentazione interattiva FastAPI con tutti i parametri: /docs (Swagger UI) o /redoc.