Closed LucaFalasca closed 1 year ago
Esempio d'uso:
curl -X POST -H "Content-Type: application/json" -d '{
"node_limit": {
"0": [600, null]
},
"prec_hash": {
"0": ["1"],
"1": []
},
"dist_matrix": [
[0.0, 0.97],
[1.63, 0.0]
],
"user_routes": [
{
"user": "prova@gmail.com",
"it_id": 11,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 8,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 5,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 6,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 7,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 9,
"date": "2023-09-20",
"nodes": ["0", "1"]
},
{
"user": "prova@gmail.com",
"it_id": 10,
"date": "2023-09-20",
"nodes": ["0", "1"]
}
]
}' http://localhost:50052/api/make-route-raw
Risposta
{
"mean_unacceptable_deviance":"0:00:00",
"n_tardy":0,
"steps":[
{
"date":"2023-09-20",
"id":"0",
"time":"10:00:00"
},
{
"date":"2023-09-20",
"id":"1",
"time":"10:01:00"
}
],
"travel_time":"0:01:00",
"user_routes":[
{
"date":"2023-09-20",
"it_id":11,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":8,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":5,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":6,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":7,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":9,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
},
{
"date":"2023-09-20",
"it_id":10,
"nodes":[
"0",
"1"
],
"user":"prova@gmail.com"
}
],
"users_travel_time":{
"10":"0:01:00",
"11":"0:01:00",
"5":"0:01:00",
"6":"0:01:00",
"7":"0:01:00",
"8":"0:01:00",
"9":"0:01:00"
}
}
Nome dell'Endpoint: make-route-raw
Descrizione: Esegue l’algoritmo di creazione del percorso.
URI della Risorsa:
api/make-route-raw
Tipo di Richiesta HTTP: POST
Content Type della Richiesta:
application/json
Content Type della Risposta:
application/json
Corpo della Richiesta:
Parametri nel Percorso (Path Parameters): Nessuno
Parametri nella Query (Query Parameters): Nessuno
Corpo della Risposta: Codice Risposta HTTP 200 OK:
Codice Risposta HTTP 400 Errore: