-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.http
More file actions
97 lines (66 loc) · 3.94 KB
/
request.http
File metadata and controls
97 lines (66 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
get http://localhost:4000/station?id=61eb2de817e57cb86cb3f8f9
### Get station by ID
get http://localhost:4000/station/Les Cascades
### Get station by name
get http://localhost:4000/stations/tramway
### Get stations of a line
get http://localhost:4000/stations
### Get all stations
get http://localhost:4000/lines?name=tramway
### Get a line by name
get http://localhost:4000/lines/tramway/stations
### Get FROM & TO stations of a line
get http://localhost:4000/lines/all
### Get IDs and names of lines (needed to populate line select options
get http://localhost:4000/segment?id=61f33b99f599b8cb46bb5ec6
### Get segment by ID
get http://localhost:4000/segment/from?id=61eb2de817e57cb86cb3f903
### Get segment by FROM station ID
get http://localhost:4000/segment/to?id=61eb2de817e57cb86cb3f8fa
### Get segment tby TO station ID
get http://localhost:4000/lines/tramway?from=61eb2de817e57cb86cb3f8f9&to=61eb2de817e57cb86cb3f8fa
### Get segment by FROM and TO stations ID
DELETE http://localhost:4000/stations/61f9dccc556a8b2128d1ed26
### Delete a station
DELETE http://localhost:4000/segment/61f9d994b2c1e5c29892fc23/61fdbd8a88d963ed04ae4f6e
### Delete a segment
PATCH http://localhost:4000/station?id=6201961c08bf347bb0ec6b32
Content-Type: application/json
{
"name":"Freres Adnane",
"coordinates":{
"latitude":35.21681277688988,
"longitude":-0.6147944927215577
},
"line":"tramway retour"
}
### Patch a station
PATCH http://localhost:4000/segment?id=61ff135ed1cae153ea0282d8
Content-Type: application/json
{
}
### Patch a segment
PATCH http://localhost:4000/line?id=61f9d994b2c1e5c29892fc24&from=61feef27d23efa2ef436e2e7&to=61f9e251925abb7bc5f5cc4d
Content-Type: application/json
{"from":{"coordinates":{"latitude":35.20902474807825,"longitude":-0.6162750701035336},"name":"Les Cascades","id":"61eb2de817e57cb86cb3f8f9"},"to":{"coordinates":{"latitude":35.21326746334253,"longitude":-0.615711808204651},"name":"Ghalmi Gare Routiere Est","id":"61eb2de817e57cb86cb3f8fa"},"path":[{"latitude":35.20902474807825,"longitude":-0.6162750701035336},{"latitude":35.20939341424022,"longitude":-0.6163941064212765},{"latitude":35.20979151211425,"longitude":-0.6165156382485183},{"latitude":35.209996414580225,"longitude":-0.6165513826533343},{"latitude":35.2102958160374,"longitude":-0.6165802622981499},{"latitude":35.210992688241426,"longitude":-0.6165647506713868},{"latitude":35.211336126394364,"longitude":-0.6165659596379137},{"latitude":35.21171016752006,"longitude":-0.6165516569776774},{"latitude":35.21186796552786,"longitude":-0.6165516569776774},{"latitude":35.21215433881761,"longitude":-0.6164872940245303},{"latitude":35.212481621531516,"longitude":-0.6163299621429875},{"latitude":35.21259249882857,"longitude":-0.6162475747845321},{"latitude":35.21277367223473,"longitude":-0.6161116975480896},{"latitude":35.21319287137555,"longitude":-0.6157702803415234},{"latitude":35.21326746334253,"longitude":-0.615711808204651}],"id":"61f73c8708774aa5b12b373b","line":"tramway"}
### Add new segment to a line
DELETE http://localhost:4000/stations/6201961c08bf347bb0ec6b32
### Delete a station by ID
DELETE http://localhost:4000/segment/61f9d994b2c1e5c29892fc23/62019b1547ff29dc45f1d019
### Delete a segment by ID
DELETE http://localhost:4000/lines/station/62019c893a1a8c6c7a9146f6
### Delete a station from line
DELETE http://localhost:4000/line/abde9a
###
GET http://localhost:4000/lines/Ligne%2016?from=61eb2de817e57cb86cb3f943&to=61eb2de817e57cb86cb3f944
### Benhamouda to Frères Adnane A16
GET http://localhost:4000/lines/Ligne%2016?from=61eb2de817e57cb86cb3f943&to=61eb2de817e57cb86cb3f944
###
PATCH http://localhost:4000/duration?id=620e5be60f237023c99bdf7a
Content-Type: application/json
[ { "segment_id": "620e5be60f237023c99bdf7c", "duration": 41 } ]
###
GET http://localhost:4000/route?from=61eb2de817e57cb86cb3f944&to=61eb2de817e57cb86cb3f948&mean=bus
### Problem
GET http://localhost:4000/route?from=61eb2de817e57cb86cb3f8fa&to=61eb2de817e57cb86cb3f935&mean=bus
### No Problem